Video frame encoding and decoding

ABSTRACT

A video frame arithmetical context adaptive encoding and decoding scheme is presented which is based on the finding, that, for sake of a better definition of neighborhood between blocks of picture samples, i.e. the neighboring block which the syntax element to be coded or decoded relates to and the current block based on the attribute of which the assignment of a context model is conducted, and when the neighboring block lies beyond the borders or circumference of the current macroblock containing the current block, it is important to make the determination of the macroblock containing the neighboring block dependent upon as to whether the current macroblock pair region containing the current block is of a first or a second distribution type, i.e., frame or field coded.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of U.S. patent application Ser. No.12/324,810, filed Nov. 26, 2008, which is a divisional of U.S. patentapplication Ser. No. 10/769,403, filed Jan. 30, 2004, the entirety ofeach of which is herein incorporated by this reference thereto.

BACKGROUND OF THE INVENTION

I. Technical field of the Invention

The present invention is related to video frame coding and, inparticular, to an arithmetic coding scheme using context assignmentbased on neighboring syntax elements.

II. Description of the Prior Art

Entropy coders map an input bit stream of binarizations of data valuesto an output bit stream, the output bit stream being compressed relativeto the input bit stream, i.e., consisting of less bits than the inputbit stream. This data compression is achieved by exploiting theredundancy in the information contained in the input bit stream.

Entropy coding is used in video coding applications. Natural camera-viewvideo signals show non-stationary statistical behavior. The statisticsof these signals largely depend on the video content and the acquisitionprocess. Traditional concepts of video coding that rely on mapping fromthe video signal to a bit stream of variable length-coded syntaxelements exploit some of the non-stationary characteristics butcertainly not all of it. Moreover, higher-order statistical dependencieson a syntax element level are mostly neglected in existing video codingschemes. Designing an entropy coding scheme for video coder by takinginto consideration these typical observed statistical properties,however, offer significant improvements in coding efficiency.

Entropy coding in today's hybrid block-based video coding standards suchas MPEG-2 and MPEG-4 is generally based on fixed tables of variablelength codes (VLC). For coding the residual data in these video codingstandards, a block of transform coefficient levels is first mapped intoa one-dimensional list using an inverse scanning pattern. This list oftransform coefficient levels is then coded using a combination ofrun-length and variable length coding. The set of fixed VLC tables doesnot allow an adaptation to the actual symbol statistics, which may varyover space and time as well as for different source material and codingconditions. Finally, since there is a fixed assignment of VLC tables andsyntax elements, existing inter-symbol redundancies cannot be exploitedwithin these coding schemes.

It is known, that this deficiency of Huffman codes can be resolved byarithmetic codes. In arithmetic codes, each symbol is associated with arespective probability value, the probability values for all symbolsdefining a probability estimation. A code word is coded in an arithmeticcode bit stream by dividing an actual probability interval on the basisof the probability estimation in several sub-intervals, eachsub-interval being associated with a possible symbol, and reducing theactual probability interval to the sub-interval associated with thesymbol of data value to be coded. The arithmetic code defines theresulting interval limits or some probability value inside the resultingprobability interval.

As may be clear from the above, the compression effectiveness of anarithmetic coder strongly depends on the probability estimation as wellas the symbols, which the probability estimation is defined on.

A special kind of context-based adaptive binary arithmetic coding,called CABAC, is employed in the H.264/AVC video coding standard. Therewas an option to use macroblock adaptive frame/field (MBAFF) coding forinterlaced video sources. Macroblocks are units into which the pixelsamples of a video frame are grouped. The macroblocks, in turn, aregrouped into macroblock pairs. Each macroblock pair assumes a certainarea of the video frame or picture. Furthermore, several macroblocks aregrouped into slices. Slices that are coded in MBAFF coding mode cancontain both, macroblocks coded in frame mode and macroblocks coded infield mode. When coded in frame mode, a macroblock pair is spatiallysub-divided into a top and a bottom macroblock, the top and the bottommacroblock comprising both pixel samples captured at a first timeinstant and picture samples captured at the second time instant beingdifferent from the first time instant. When coded in field mode, thepixel samples of a macroblock pair are distributed to the top and thebottom macroblock of the macroblock pair in accordance with theircapture time.

The introduction of MBAFF coding to the preceding stage as analternative to PAFF (picture adaptive frame/field) coding where thedecisions between frame and field coding are made for each frame as ahole, was motivated by the fact that if a frame consists of mixedregions where some regions are moving and others are not, it istypically more efficient to code the non-moving regions in frame modeand the moving regions in the field mode.

As mentioned above, in the H.264/AVC video coding standard, there is anoption to use macroblock adaptive frame/field coding (MBAFF) forinterlaced video sources. As turned out from the above considerations,in MBAFF, the pixel samples in a respective macroblock pair aredistributed in different ways to the top end field macroblock, dependingon the macroblock pair being frame or field coded. Thus, on the onehand, when MBAFF mode is active, the neighborhood between pixel samplesof neighboring is somewhat complicated compared to the case of PAFFcoding mode.

On the other hand, the CABAC entropy coding scheme tries to exploitstatistical redundancies between the values of syntax elements ofneighboring blocks. That is, for the coding of the individual binarydecisions, i.e., bins, of several syntax elements, context variables areassigned depending on the values of syntax-elements of neighboringblocks located to the left of and above the current block. In thisdocument, the term “block” is used as collective term that can represent4×4 luma or chroma blocks used for transform coding, 8×8 luma blocksused for specifying the coded block pattern, macroblocks, macroblock orsub-macroblock partitions used for motion description.

In the case of macroblock adaptive frame/field coding, while theneighborhoods that are used for CABAC are not clear since field andframe macroblocks can be mixed inside the picture or slice. In thesolution to this problem that was included in older versions of theH.264/AVC, each macroblock pair was considered as frame macroblock pairfor the purpose of context modeling in CABAC. However, with thisconcept, the coding efficiency could be degraded, since choosingneighboring blocks that do not adjoin to the current blocks affects theadaption of the conditional probability models.

SUMMARY OF THE INVENTION

It is the object of the present invention to provide a video codingscheme, which enables a higher compression effectiveness.

In accordance with the first aspect of the present invention, thisobject is achieved by a method for encoding a video signal representingat least one video frame, with at least one video frame being composedof picture samples, the picture samples belonging either to a first or asecond field being captured at different time instants, the video framebeing spatially divided up into macroblock pair regions, each macroblockpair region being associated with a top and bottom macroblock, themethod comprising the steps of deciding, for each macroblock pairregion, as to whether same is of a first or a second distribution type;assigning, for each macroblock pair region, each of the pixel samples inthe respective macroblock pair region to a respective one of the top andbottom macroblock of the respective macroblock pair region, inaccordance with the distribution type of the respective macroblock pairregion, and pre-coding the video signal into a pre-coded video signal,the pre-coding comprising the sub-step of pre-coding a currentmacroblock of the top and bottom macroblock associated with a currentmacroblock pair region of the macroblock pair regions to obtain acurrent syntax element. Thereafter, it is determined, for the currentsyntax element, a neighboring macroblock at least based upon as towhether the current macroblock pair region is of a first or seconddistribution type. One of at least two context models is assigned to thecurrent syntax element based on a pre-determined attribute of theneighboring macroblock, wherein each context model is associated with adifferent probability estimation. Finally, arithmetically encoding thesyntax element into a coded bit stream based on the probabilityestimation with which the assigned context model is associated.

In accordance with the second aspect of the present invention, thisobject is achieved by a method for decoding a syntax element from acoded bit stream, the coded bit stream being an arithmetically encodedversion of a pre-coded video signal, the pre-coded video signal being apre-coded version of a video signal, the video signal representing atleast one video frame being composed of picture samples, the picturesamples belonging either to a first or a second field being captured ata different time instants, the video frame being spatially divided upinto macroblock pair regions, each macroblock pair region beingassociated with a top and a bottom macroblock, each macroblock pairregion being either of a first or a second distribution type, wherein,for each macroblock pair region, each of the pixel samples in therespective macroblock pair region is assigned to a respective one of thetop and bottom macroblock of the respective macroblock pair region inaccordance with the distribution type of the respective macroblock pairregion, wherein the syntax element relates to a current macroblock ofthe top and bottom macroblock of a current macroblock pair region of themacroblock pair regions. The method comprises determining, for thecurrent syntax element, a neighboring macroblock at least based upon asto whether the current macroblock pair region is of a first or a seconddistribution type; assigning one of at least two context models to thecurrent syntax element based on a predetermined attribute of theneighboring macroblock, wherein each context model is associated with adifferent probability estimation; and arithmetically decoding the syntaxelement from the coded bit stream based on the probability estimationwith which the assigned context model is associated.

In accordance with the third aspect of the present invention, thisobject is achieved by an Apparatus for encoding a video signalrepresenting at least one video frame, with at least one video framebeing composed of picture samples, the picture samples belonging eitherto a first or a second field being captured at different time instants,the video frame being spatially divided up into macroblock pair regions,each macroblock pair region being associated with a top and bottommacroblock, the apparatus comprising means for deciding, for eachmacroblock pair region, as to whether same is of a first or a seconddistribution type; means for assigning, for each macroblock pair region,each of the pixel samples in the respective macroblock pair region to arespective one of the top and bottom macroblock of the respectivemacroblock pair region, in accordance with the distribution type of therespective macroblock pair region; means for pre-coding the video signalinto a pre-coded video signal, the pre-coding comprising the sub-step ofpre-coding a current macroblock of the top and bottom macroblockassociated with a current macroblock pair region of the macroblock pairregions to obtain a current syntax element; means for determining, forthe current syntax element, a neighboring macroblock at least based uponas to whether the current macroblock pair region is of a first or seconddistribution type; means for assigning one of at least two contextmodels to the current syntax element based on a pre-determined attributeof the neighboring macroblock, wherein each context model is associatedwith a different probability estimation; and means for arithmeticallyencoding the syntax element into a coded bit stream based on theprobability estimation with which the assigned context model isassociated.

In accordance with the forth aspect of the present invention, thisobject is achieved by an apparatus method for decoding a syntax elementfrom a coded bit stream, the coded bit stream being an arithmeticallyencoded version of a pre-coded video signal, the pre-coded video signalbeing a pre-coded version of a video signal, the video signalrepresenting at least one video frame being composed of picture samples,the picture samples belonging either to a first or a second field beingcaptured at a different time instants, the video frame being spatiallydivided up into macroblock pair regions, each macroblock pair regionbeing associated with a top and a bottom macroblock, each macroblockpair region being either of a first or a second distribution type,wherein, for each macroblock pair region, each of the pixel samples inthe respective macroblock pair region is assigned to a respective one ofthe top and bottom macroblock of the respective macroblock pair regionin accordance with the distribution type of the respective macroblockpair region, wherein the syntax element relates to a current macroblockof the top and bottom macroblock of a current macroblock pair region ofthe macroblock pair regions, wherein the apparatus comprises means fordetermining, for the current syntax element, a neighboring macroblock atleast based upon as to whether the current macroblock pair region is ofa first or a second distribution type; means for assigning one of atleast two context models to the current syntax element based on apredetermined attribute of the neighboring macroblock, wherein eachcontext model is associated with a different probability estimation; and

-   -   mean for arithmetically decoding the syntax element from the        coded bit stream based on the probability estimation with which        the assigned context model is associated.

The present invention is based on the finding that when, for whateverreason, such as the better effectiveness when coding video frames havingnon-moving regions and moving regions, macroblock pair regions of afirst and a second distribution type, i.e., field and frame codedmacroblock pairs, are used concurrently in a video frame, i.e. MBAFFcoding is used, the neighborhood between contiguous blocks of pixelsamples has to be defined in a way different from considering eachmacroblock pair as frame macroblock pair for the purpose of contextmodeling and that the distance of areas covered by a neighboring and acurrent block could be very large when considering each macroblock pairas a frame macroblock pair. This in turn, could degrade the codingefficiency, since choosing neighboring blocks that are not arrangednearby the current block affects the adaption of the conditionalprobability models.

Further, the present invention is based on the finding, that, for sakeof a better definition of neighborhood between blocks of picturesamples, i.e. the neighboring block which the syntax element to be codedor decoded relates to and the current block based on the attribute ofwhich the assignment of a context model is conducted, and when theneighboring block lies beyond the borders or circumference of thecurrent macroblock containing the current block, it is important to makethe determination of the macroblock containing the neighboring blockdependent upon as to whether the current macroblock pair regioncontaining the current block is of a first or a second distributiontype, i.e., frame or field coded.

The blocks may be a macroblock or some sub-part thereof. In both cases,the determination of a neighboring block comprises at least thedetermination of a neighboring macroblock a 5 long as the neighboringblock lies beyond the borders of the current macroblock.

SHORT DESCRIPTION OF THE DRAWINGS

Preferred embodiments of the present invention are described in moredetail below with respect to the figures.

FIG. 1 shows a high-level block diagram of a coding environment in whichthe present invention may be employed.

FIG. 2 shows a block diagram of the entropy coding part of the codingenvironment of FIG. 1, in accordance with an embodiment of the presentinvention.

FIG. 3 shows a schematic diagram illustrating the spatial subdivision ofa picture or video frame into macroblock pairs, in accordance with anembodiment of the present invention.

FIG. 4 a shows a schematic diagram illustrating the frame mode, inaccordance with an embodiment of the present invention.

FIG. 4 b shows a schematic diagram illustrating the field mode, inaccordance with an embodiment of the present invention.

FIG. 5 shows a flow diagram illustrating the encoding of syntax elementswith context assignments based on neighboring syntax elements inaccordance with an embodiment of the present invention.

FIG. 6 shows a flow diagram illustrating the binary arithmetic coding ofthe syntax elements based on the context model to which it is assignedin accordance with an embodiment of the present invention.

FIG. 7 shows a schematic diagram illustrating the addressing scheme ofthe macroblocks in accordance with an embodiment of the presentinvention.

FIG. 8 shows a table illustrating how to obtain the macroblock addressmbAddrN indicating the macroblock containing a sample having coordinatesxN and yN relative to the upper-left sample of a current macroblock and,additionally, the y coordinate yM for the sample in the macroblockmbAddrN for that sample, dependent on the sample being arranged beyondthe top or the left border of the current macroblock, the currentmacroblock being frame or field coded, and the current macroblock beingthe top or the bottom macroblock of the current macroblock pair, and,eventually, the macroblock mbAddrA being frame or field coded and theline in which the sample lies having an odd or even line number yN.

FIG. 9 shows a schematic illustrating macroblock partitions,sub-macroblock partitions, macroblock partitions scans, andsub-macroblock partition scans.

FIG. 10 shows a high-level block diagram of a decoding environment inwhich the present invention may be employed.

FIG. 11 shows a flow diagram illustrating the decoding of the syntaxelements coded as shown in FIGS. 5 and 6 from the coded bit stream, inaccordance with an embodiment of the present invention.

FIG. 12 shows a flow diagram illustrating the arithmetical decodingprocess and the decoding process of FIG. 11 in accordance with anembodiment of the present invention.

FIG. 13 shows a basic coding structure for the emerging H.264/AVC videoencoder for a macroblock.

FIG. 14 illustrates a context template consisting of two neighboringsyntax elements A and B to the left and on the top of the current syntaxelement C.

FIG. 15 shows an illustration of the subdivision of a picture intoslices.

FIG. 16 shows, to the left, intra_(—)4×4 prediction conducted forsamples a-p of a block using samples A_Q, and to the right, “predictiondirections for intra_(—)4×4 prediction.

FIG. 1 shows a general view of a video encoder environment to which thepresent invention could be applied. A picture of video frame 10 is fedto a video precoder 12. The video precoder treats the picture 10 inunits of so-called macroblocks 10 a. Each macroblock contains severalpicture samples of picture 10. On each macroblock a transformation intotransformation coefficients is performed followed by a quantization intotransform coefficient levels. Moreover, intra-frame prediction or motioncompensation is used in order not to perform the afore mentioned stepsdirectly on the pixel data but on the differences of same to predictedpixel values, thereby achieving small values which are more easilycompressed.

Precoder 12 outputs the result, i.e., the precoded video signal. Allresidual data elements in the precoded video signal, which are relatedto the coding of transform coefficients, such as the transformcoefficient levels or a significance map indicating transformcoefficient levels skipped, are called residual data syntax elements.Besides these residual data syntax elements, the precoded video signaloutput by precoder 12 contains control information syntax elementscontaining control information as to how each macroblock has been codedand has to be decoded, respectively. In other words, the syntax elementsare dividable into two categories. The first category, the controlinformation syntax elements, contains the elements related to amacroblock type, sub-macroblock type, and information on predictionmodes both of a spatial and of temporal types as well as slice-based andmacroblock-based control information, for example. In the secondcategory, all residual data elements such as a significance mapindicating the locations of all significant coefficients inside a blockof quantized transform coefficients, and the values of the significantcoefficients, which are indicated in units of levels corresponding tothe quantizations steps, are combined, i.e., the residual data syntaxelements.

The macroblocks into which the picture 10 is partitioned are groupedinto several slices. In other words, the picture 10 is subdivided intoslices. An example for such a subdivision is shown in FIG. 16, in whicheach block or rectangle represents a macroblock. For each slice, anumber of syntax elements are generated by precoder 12, which form acoded version of the macro blocks of the respective slice.

The precoder 12 transfers the syntax elements to a final coder stage 14,which is an entropy coder and explained in more detail with respect toFIG. 2. The final coder stage 14 generates an arithmetic codeword foreach slice. When generating the arithmetic codeword for a slice, thefinal coding stage 14 exploits the fact that each syntax element is adata value having a certain meaning in the video signal bit stream thatis passed to the entropy coder 14. The entropy coder 14 outputs a finalcompressed arithmetic code video bit stream comprising arithmeticcodewords for the slices of picture 10.

FIG. 2 shows the arrangement for coding the syntax elements into thefinal arithmetic code bit stream, the arrangement generally indicated byreference number 100. The coding arrangement 100 is divided into threestages, 100 a, 100 b, and 100 c.

The first stage 100 a is the binarization stage and comprises abinarizer 102. An input of the binarizer 102 is connected to an input104 of stage 100 a via a switch 106. At the same time, input 104 formsthe input of coding arrangement 100. The output of binarizer 102 isconnected to an output 108 of stage 100 a, which, at the same time,forms the input of stage 100 b. Switch 106 is able to pass syntaxelements arriving at input 104 to either binarizer 102 or binarizationstage output 108, thereby bypassing binarizer 102.

The function of switch 106 is to directly pass the actual syntax elementat input 104 to the binarization stage output 108 if the syntax elementis already in a wanted binarized form. Examples for syntax elements thatare not in the correct binarization form, called non-binary valuedsyntax elements, are motion vector differences and transform coefficientlevels. Examples for a syntax element that has not to be binarized sinceit is already a binary value comprise the MBAFF (MBAFF=MacroblockAdaptive Frame/Field) Coding mode flag or mb_field_decoding_flag, themb_skip_flag and coded_block_flag to be described later in more detail.Examples for a syntax element that has to be binarized since it is not abinary value comprise syntax elements mb_type, coded_block_pattern,ref_idx_(—)10, ref_idx11, mvd_(—)10, mvd_(—)11, andintro_chroma_pred_mode.

Different binarization schemes are used for the syntax elements to bebinarized. For example, a fixed-length binarization process isconstructed by using an L-bit unsigned integer bin string of the syntaxelement value, where L is equal to log₂ (cMax+1) rounded up to thenearest integer greater than or equal to the sum, with cMax being themaximum possible value of the syntax element. The indexing of the binsfor the fl binarization is such that the bin index of zero relates tothe least significant bit with increasing values of the bin indextowards the most significant bit. Another binarization scheme is atruncated unary binarization scheme where syntax element values Csmaller than the largest possible value cMax are mapped to a bit or binstring of length C+1 with the bins having a bin index smaller than Cbeing equal to 1 and the bin having the bin index of C being equal to 0,whereas for syntax elements equal to the largest possible value cMax,the corresponding bin string is a bit string of length cMax with allbits equal to one not followed by a zero. Another binarization scheme isa k-th order exponential Golomb binarization scheme, where a syntaxelement is mapped to a bin string consisting of a prefix bit string and,eventually, a suffix bit string.

The non-binary valued syntax elements are passed via switch 106 tobinarizer 102. Binarizer 102 maps the non-binary valued syntax elementsto a codeword, or a so-called bin string, so that they are now in abinary form. The term “bin” means the binary decision that have to bemade at a node of a coding tree defining the binarization mapping of anon-binary value to a bit string or codeword, when transitioning fromthe route node of the coding tree to the leaf of the coding treecorresponding to the non-binary value of the non-binary syntax elementto be binarized. Thus, a bin string is a sequence of bins or binarydecisions and corresponds to a codeword having the same number of bits,each bit being the result of a binary decision.

The bin strings output by binarizer 102 may not be passed directly tobinarization stage output 108 but controllably passed to output 108 by abin loop over means 110 arranged between the output of binarizer 102 andoutput 108 in order to merge the bin strings output by binarizer 102 andthe already binary valued syntax elements bypassing binarizer 102 to asingle bit stream at binarization stage output 108.

Thus, the binarization stage 108 is for transferring the syntax elementsinto a suitable binarized representation. The binarization procedure inbinarizer 102 preferably yields a binarized representation which isadapted to the probability distribution of the syntax elements so as toenable very efficient binary arithmetic coding.

Stage 100 b is a context modeling stage and comprises a context modeler112 as well as a switch 113. The context modeler 112 comprises an input,an output, and an optional feedback input. The input of context modeler112 is connected to the binarization stage output 108 via switch 113.The output of context modeler 112 is connected to a regular coding inputterminal 114 of stage 100 c. The function of switch 113 is to pass thebits or bins of the bin sequence at binarization stage output 108 toeither the context modeler 112 or to a bypass coding input terminal 116of stage 100 c, thereby bypassing context modeler 112.

The aim of switch 113 is to ease the subsequent binary arithmetic codingperformed in stage 100 c. To be more precise, some of the bins in thebin string output by binarizer 102 show heuristically nearly anequi-probable distribution. This means, the corresponding bits are, witha probability of nearly 50%, 1 and, with a probability of nearly 50%, 0,or, in other words, the bits corresponding to this bin in a bin stringhave a 50/50 chance to be 1 or 0. These bins are fed to thebypass-coding input terminal 116 and are binary arithmetically coded byuse of an equi-probable probability estimation, which is constant and,therefore, needs no adaption or updating overhead. For all other bins,it has been heuristically determined that the probability distributionof these bins depends on other bins as output by stage 100 a so that itis worthwhile to adapt or update the probability estimation used forbinary arithmetically coding of the respective bin as it will bedescribed in more detail below exemplarily with respect to exemplarysyntax elements. The latter bins are thus fed by switch 113 to the inputterminal of context modeler 112.

Context modeler 112 manages a set of context models. For each contextmodel, the context modeler 112 has stored an actual bit or bin valueprobability distribution estimation. For each bin that arrives at theinput of context modeler 112, the context modeler 112 selects one of thesets of context models. In other words, the context modeler 112 assignsthe bin to one of the set of context models. The assignment of bins to acontext model is such that the actual probability distribution of binsbelonging to the same context model show the same or likewise behaviorso that the actual bit or bin value probability distribution estimationstored in the context modeler 112 for a certain context model is a goodapproximation of the actual probability distribution for all bins thatare assigned to this context model. The assignment process in accordancewith the present invention exploits the spatial relationship betweensyntax element of neighboring blocks. This assignment process will bedescribed in more detail below.

When having assigned the context model to an incoming bin the contextmodeler 112 passes the bin further to arithmetical coding stage 100 ctogether with the probability distribution estimation of the contextmodel, which the bin is assigned to. By this measure, the contextmodeler 112 drives the arithmetical coding stage 100 c to generate asequence of bits as a coded representation of the bins input in contextmodeler 112 by switch 113 according to the switched bit valueprobability distribution estimations as indicated by the context modeler112.

Moreover, the context modeler 112 continuously updates the probabilitydistribution estimations for each context model in order to adapt theprobability distribution estimation for each context model to theproperty or attributes of the picture or video frame from which thesyntax elements and bins have been derived. The estimation adaptation orestimation update is based on past or prior bits or bin values which thecontext modeler 112 receives at the feedback input over a feedback line117 from stage 100 c or may temporarily store. Thus, in other words, thecontext modeler 112 updates the probability estimations in response tothe bin values passed to arithmetical coding stage 100 c. To be moreprecise, the context modeler 112 uses a bin value assigned to a certaincontext model merely for adaptation or update of the probabilityestimation that is associated with the context model of this bin value.

Some of the syntax elements, when the same bin or same syntax elementoccurs several times in the bins passed from stage 100 a may be assignedto different of the context models each time they occur, depending onpreviously incoming or previously arithmetically coded bins, and/ordepending on other circumstances, such as previously coded syntaxelements of neighboring blocks, as is described in more detail belowwith respect to exemplary syntax elements.

It is clear from the above, that the probability estimation used forbinary arithmetically coding determines the code and its efficiency inthe first place, and that it is of paramount importance to have anadequate model that exploits the statistical dependencies of the syntaxelements and bins to a large degree so that the probability estimationis always approximating very effectively the actual probabilitydistribution during encoding.

The third stage 100 c of coding arrangement 100 is the arithmetic codingstage. It comprises a regular coding engine 118, a bypass-coding engine120, and a switch 122. The regular coding engine 118 comprises an inputand an output terminal. The input terminal of regular coding engine 118is connected to the regular coding input terminal 114. The regularcoding engine 118 binary arithmetically codes the bin values passed fromcontext modeler 112 by use of the context model also passed from contextmodeler 112 and outputs coded bits. Further, the regular coding engine118 passes bin values for context model updates to the feedback input ofcontext modeler 112 over feedback line 117.

The bypass-coding engine 112 has also an input and an output terminal,the input terminal being connected to the bypass coding input terminal116. The bypass-coding engine 120 is for binary arithmetically codingthe bin values passed directly from binarization stage output 108 viaswitch 113 by use of a static predetermined probability distributionestimation and also outputs coded bits.

The coded bits output from regular coding engine 118 and bypass codingengine 120 are merged to a single bit stream at an output 124 of codingarrangement 100 by switch 122, the bit stream representing a binaryarithmetic coded bit stream of the syntax elements as input in inputterminal 104. Thus, regular coding engine 118 and bypass coding 120cooperate in order to bit wise perform arithmetical coding based oneither an adaptive or a static probability distribution model.

After having described with respect to FIGS. 1 and 2 rather generallythe operation of coding arrangement 100, in the following itsfunctioning is described in more detail with respect to the handling ofexemplary syntax elements for which an context assignment process basedon syntax elements of neighboring blocks is used, in accordance withembodiments of the present invention. In order to do so, firstly, withregard to FIGS. 3 to 4 b, the meaning of MBAFF coding is described, inorder to enable a better understanding of the definition of neighborhoodbetween a current block and a neighboring block used during assignmentof a context model to a syntax element concerning the current block incase of MBAFF.

FIG. 3 shows a picture or decoded video frame 10. The video frame 10 isspatially partitioned into macroblock pairs 10 b. The macroblock pairsare arranged in an array of rows 200 and columns 202. Each macroblockpair consists of two macroblocks 10 a.

In order to be able to address each macroblock 10 a, a sequence isdefined with respect to macroblocks 10 a. In order to do so, in eachmacroblock pair, one macroblock is designated the top macroblock whereasthe other macroblock in the macroblock pair is designated the bottommacroblock, the meaning of top and bottom macroblock depending on themode by which a macroblock pair is coded by precoder 12 (FIG. 1) as willbe described with respect to FIGS. 4 a and 4 b. Thus, each macroblockpair row 200 consists of two macroblock rows, i.e., an top macroblockrow 200 a consisting of the top macroblocks in the macroblock pairs ofthe macroblock pair line 200 and a bottom macroblock row 200 bcomprising the bottom macroblocks of the macroblock pairs.

In accordance with the present example, the top macroblock of the topleft macroblock pair resides at address zero. The next address, i.e.address 1, is assigned to the bottom macroblock of the top leftmacroblock pair. The addresses of the top macroblocks of the macroblockpairs in the same, i.e., top macroblock row 200 a, are 2, 4, . . . ,2i-2, with the addresses rising from left to right, and with iexpressing the picture width in units of macroblocks or macroblockpairs. The addresses 1, 3, . . . , 2i-1 are assigned to the bottommacroblocks of the macroblock pairs in the top macroblock pair row 200,the addresses rising from left to right. The next 2i-addresses from 2ito 4i-1 are assigned to the macroblocks of the macroblock pairs in thenext macroblock pair row from the top and so on, as illustrated in FIG.3 by the numbers written into the boxes representing the macroblocks 10a and by the arched rows.

It is emphasized that FIG. 3 does show the spatial subdivision ofpicture 10 in units of macroblock pairs rather than in macroblocks. Eachmacroblock pair 10 b represents a spatial rectangular region of thepictures. All picture samples or pixels (not shown) of picture 10 lyingin the spatial rectangular region of a specific macroblock pair 10 bbelong to this macroblock pair. If a specific pixel or picture samplebelongs to the top or the bottom macroblock of a macroblock pair dependson the mode by which precoder 12 has coded the macroblocks in thatmacroblock pair as it is described in more detail below.

FIG. 4 a shows on the left hand side the arrangement of pixels orpicture samples belonging to a macroblock pair 10 b. As can be seen, thepixels are arranged in an array of rows and columns. Each pixel shown isindicated by a number in order to ease the following description of FIG.4 a. As can be seen in FIG. 4 a, some of the pixels are marked by an “x”while the others are marked “□”. All pixels marked with “x” belong to afirst field of the picture while the other pixels marked with “□” belongto a second field of the picture. Pixels belonging to the same field arearranged in alternate rows of the picture. The picture or video framecan be considered to contain two interleaved fields, a top and a bottomfield. The top field comprises the pixels marked with “□” and containseven-numbered rows 2n+2, 2n+4, 2n+6, . . . with 2n being the number ofrows of one picture or video frame and n being an integer greater thanor equal to 0. The bottom field contains the odd-numbered rows startingwith the second line of the frame.

It is assumed that the video frame to which macroblock pair 10 bbelongs, is an interlaced frame where the two fields were captured atdifferent time instants, for example the top field before the bottomfield. It is now that the pixels or picture samples of a macroblock pairare differently assigned to the top or bottom macroblock of themacroblock pair, depending on the mode by which the respectivemacroblock pair is precoded by precoder 12 (FIG. 1). The reason for thisbeing the following.

As described above with respect to FIG. 1, the picture samples of amacroblock, which may be luminance or luma and chrominance or chromasamples, may be either spatially or temporarily predicted by precoder12, and the resulting prediction residual is encoded using transformcoding in order to yield the residual data syntax elements. It is nowthat in interlaced frames (and it is assumed that the present videoframe is an interlaced frame), with regions of moving objects or cameramotion, two adjacent rows of pixels tend to show a reduced degree ofstatistical dependency when compared to progressive video frames inwhich both fields are captured at the same time instant. Thus, in casesof such moving objects or camera motion, the pre-coding performed byprecoder 12 which, as stated above, operates on macroblocks, may achievemerely a reduced compression efficiency when a macroblock pair isspatially sub-divided into a top macroblock representing the top halfregion of the macroblock pair and a bottom macroblock representing thebottom half region of the macroblock pair, since in this case, bothmacroblocks, the top and the bottom macroblock, comprise both top fieldand bottom field pixels. In this case, it may be more efficient forprecoder 12 to code each field separately, i.e., to assign top fieldpixels to the top macroblock and bottom field pixels to the bottom fieldmacroblock.

In order to illustrate as to how the pixels of a macroblock pair areassigned to the top and bottom macroblock of the, FIGS. 4 a and 4 b showon the right hand side the resulting top and bottom macroblock inaccordance with the frame and field mode, respectively.

FIG. 4 a represents the frame mode, i.e., where each macroblock pair isspatially subdivided in a top and a bottom half macroblock. FIG. 4 ashows at 250 the top macroblock and at 252 the bottom macroblock asdefined when they are coded in the frame mode, the frame mode beingrepresented by double-headed arrow 254. As can be seen, the topmacroblock 250 comprises one half of the pixel samples of the macroblockpair 10 b while the other picture samples are assigned to the bottommacroblock 252. To be more specific, the picture samples of the top halfrows numbered 2n+1 to 2n+6 belong to the top macroblock 250, whereas thepicture samples 91 to 96, 101 to 106, 111 to 116 of the bottom halfcomprising rows 2n+7 to 2n+12 of the macroblock pair 10 b belong to thebottom macroblock 252. Thus, when coded in frame mode, both macroblocks250 and 252 comprise both, picture elements of the first field markedwith “x” and captured at a first time instant and picture samples of thesecond field marked with “□” and captured at a second, different timeinstant.

The assignment of pixels as they are output by a camera or the like, totop or bottom macroblocks is slightly different in field mode. Whencoded in field mode, as is indicated by double headed arrow 256 in FIG.4 b, the top macroblock 252 of the macroblock pair 10 b contains allpicture samples of the top field, marked with “x”, while the bottommacroblock 254 comprises all picture samples of the bottom field, markedwith “□”. Thus, when coded in accordance with field mode 256, eachmacroblock in a macroblock pair does merely contain either picturesamples of the top field or picture samples of the bottom field ratherthan a mix of picture samples of the top and bottom field.

Now, after having described the spatial sub-division of a picture intomacroblock pairs and the assignment of picture samples in a macroblockpair to either the top or the bottom macroblock of the macroblock pair,the assignment depending on the mode by which the macroblock pair or themacroblocks of the macroblock pair are coded by precoder 12, referenceis again made to FIG. 1 in order to explain the function and meaning ofthe syntax element mb_field_decoding_flag contained in the precodedvideo signal output by precoder 12, and, concurrently, in order toexplain the advantages of MBAFF coded frames over just field or framecoded frames.

When the precoder 12 receives a video signal representing an interlacedvideo frame, precoder 12 is free to make the following decisions whencoding the video frame 10:

-   -   1. It can combine the two fields together to code them as one        single coded frame, so that each macroblock pair and each        macroblock would be coded in frame mode.    -   2. Alternatively, it could combine the two fields and code them        as separate coded fields, so that each macroblock pair and each        macroblock would be coded in field mode.    -   3. As a last option, it could combine the two fields together        and compress them as a single frame, but when coding the frame        it splits the macroblock pairs into either pairs of two field        macroblocks or pairs of two frame macroblocks before coding        them.

The choice between the three options can be made adaptively for eachframe in a sequence. The choice between the first two options isreferred to as picture adaptive frame/field (PAFF) coding. When a frameis coded as two fields, each field is partitioned into macroblocks andis coded in a manner very similar to a frame.

If a frame consists of mixed regions where some regions are moving andothers are not, it is typically more efficient to code the non-movingregions in frame mode and the moving regions in the field mode.Therefore, the frames/field encoding decision can be made independentlyfor each vertical pair of macroblocks in a frame. This is the thirdcoding option of the above-listed options. This coding option isreferred to as macroblock adaptive frame/field (MBAFF) coding. It isassumed in the following that precoder 12 decides to use just thisoption. As described above, MBAFF coding allows the precoder to betteradapt the coding mode type (filed or frame mode) to the respective areasof scenes. For example, precoder 12 codes macroblock pairs located atstationary areas of a video scene in frame mode, while coding macroblockpairs lying in areas of a scene showing fast movements in field mode.

As mentioned above, for a macroblock pair that is coded in frame mode,each macroblock contains frame lines. For a macroblock pair that iscoded in field mode, the top macroblock contains top field lines and thebottom macroblock contains bottom field lines. The frame/field decisionfor each macroblock pair is made at the macroblock pair level byprecoder 12, i.e. if the top macroblock is field coded same applies forthe bottom macroblock within same macroblock pair. By this measure, thebasic macroblock processing structure is kept intact, and motioncompensation areas are permitted to be as large as the size of amacroblock.

Each macroblock of a field macroblock pair is processed very similarlyto a macroblock within a field in PAFF coding. However, since a mixtureof field and frame macroblock pairs may occur within an MBAFF frame,some stages of the pre-coding procedure in precoder 12, such as theprediction of motion vectors, the prediction of intra prediction modes,intra frame sample prediction, deblocking filtering and context modelingin entropy coding and the zig-zag scanning of transform coefficients aremodified when compared to the PAFF coding in order to account for thismixture.

To summarize, the pre-coded video signal output by precoder 12 dependson the type of coding precoder 12 has decided to use. In case of MBAFFcoding, as it is assumed herein, the pre-coded video signal contains aflag mb_field_decoding_flag for each non-skipped macroblock pair. Theflag mb_field_decoding_flag indicates for each macroblock pair itbelongs to whether the corresponding macroblocks are coded in frame orfield coding mode. On decoder side, this flag is necessary in order tocorrectly decode the precoded video signal. In case, the macroblocks ofa macroblock pair are coded in frame mode, the flagmb_field_decoding_flag is zero, whereas the flag is one in the othercase.

Now, while the general mode of operation of the original decoderarrangement of FIG. 2 has been described without referring to a specialbin, with respect to FIG. 5, the functionality of this arrangement isnow described with respect to the binary arithmetic coding of the binstrings of exemplary syntax elements for which the spatial relationshipbetween the syntax element of neighboring blocks is used while MBAFFcoding mode is active.

The process shown in FIG. 5 starts at the arrival of a bin value of asyntax element at the input of context modeler 112. That is, eventually,the syntax element had to be binarized in binarizer 102 if needed, i.e.unless the syntax element is already a binary value. In a first step300, context modeler 112 determines as to whether the incoming bin is abin dedicated to a context assignment based on neighboring syntaxelements, i.e. syntax elements in neighboring blocks. It is recalledthat the description of FIG. 5 assumes that MBAFF coding is active. Ifthe determination in step 300 results in the incoming bin not beingdedicated to context assignment based on neighboring syntax elements,another syntax element handling is performed in step 304. In the secondcase, context modeler 112 determines a neighboring block of the currentblock to which the syntax element of the incoming bin relates. Thedetermination process of step 306 is described in more detail below withrespect to exemplary syntax elements and their bins, respectively. Inany case, the determination in step 306 depends on the currentmacroblock to which the syntax element of the current bin relates beingframe or field coded, as long as the neighboring block in question isexternal to the macroblock containing the current block.

Next, in step 308, the context modeler 112 assigns a context model tothe bin based on a predetermined attribute of the neighboring block. Thestep of assigning 308 results in a context index ctxIdx pointing to therespective entry in a table assigning each context index a probabilitymodel, to be used for binary arithmetic coding of the current bin of thecurrent syntax element.

After the determination of ctxIdx, context modeler 112 passes thevariable ctxIdx or the probability estimation status indexed by ctxIdxalong with the current bin itself to regular coding engine 118. Based onthese inputs, the regular coding engine 118 arithmetically encodes, instep 322, the bin into the bit stream 124 by using the currentprobability state of the context model as indexed by ctxIdx.

Thereafter, regular coding engine 118 passes the bin value via path 117back to context modeler 112, whereupon context modeler 112 adapts, instep 324, the context model indexed by ctxIdx with respect to itsprobability estimation state. Thereafter, the process of coding thesyntax element into the bit stream at the output 124 ends at 326.

It is emphasized that the bin string into which the syntax element maybe binarized before step 310 may be composed of both, bins that arearithmetically encoded by use of the current probability state ofcontext model ctxIdx in step 322 and bins arithmetically encoded inbypass coding engine 120 by use of an equi-probable probabilityestimation although this is not shown in FIG. 5. Rather, FIG. 5 merelyconcerns the exemplary encoding of one bin of a syntax element.

The steps 322 and 324, encompassed by dotted line 327 in FIG. 5, areexplained in more detail below with respect to FIG. 6.

FIG. 6 shows, on the left hand side, a flow diagram of the process 327.On the right hand side, FIG. 6 shows a memory 328 to which both, thecontext modeler 112 and the regular coding engine 118, have access inorder to load, write, and update specific variables. These variablescomprise R and L, which define the current state or current probabilityinterval of the binary arithmetical coder 100 c. In particular, Rdenotes the current interval range R, while L denotes the base or lowerend point of current probability interval. Thus, the current interval ofthe binary arithmetic coder 100 c extends from L to L+R.

Furthermore, memory 328 contains a table 329, which associates eachpossible value of ctxIdx, e.g. 0-398, a pair of a probability stateindex σ and an MPS value ω, both defining the current probabilityestimation state of the respective context model indexed by therespective context index ctxIdx. The probability state σ is an indexthat uniquely identifies one of a set of possible probability valuesp_(σ). The probability values p_(σ) are an estimation for theprobability of the next bin of that context model to be a least probablesymbol (LPS). Which of the possible bin values, i.e., a null or one, ismeant by the LPS, is indicated by the value of MPS ω. If ω is 1, LPS is0′ and vice-versa. Thus, the state index and MPS together uniquelydefine the actual probability state or probability estimation of therespective context model. Both variables divide the actual interval L toL+R into two sub-intervals, namely the first sub-interval extending fromL to L+R·(1−p_(σ)) and the second interval extending from L+R·p_(σ) toL+R. The first or lower sub-interval corresponds to the most probablesymbol whereas the upper sub-interval corresponds to the least probablesymbol. Exemplary values for p_(σ) are derivable from the followingrecursive equation, with α being a value between about 0.8 to 0.99, andpreferably being α=(0.01875/0.5)^(1/63), a being an integer from 1 to63: p_(σ)=α·p_(σ-1), for all σ=1, . . . , 63, and p₀=0.5.

Now, in a first step 330, the range R_(LPS) of the lower sub-interval isdetermined based on R and the probability state corresponding to thechosen context model indexed by ctxIdx, later on called simply σ_(i),with i being equal to ctxIdx. The determination in step 330 may comprisea multiplication of R with p_(σi). Nevertheless, in accordance with analternative embodiment, the determination in step 330 could be conductedby use of a table, which assigns to each possible pair of probabilitystate index σ_(i) and a variable ρ a value for R_(LPS), such a tablebeing shown at 332. The variable ρ would be a measure for the value of Rin some coarser units then a current resolution by which R iscomputationally represented.

After having determined R_(LPS), in step 334, regular coding engine 118amends R to be R-R_(LPS), i.e., to be the range of the lowersub-interval.

Thereafter, in step 336, the regular coding engine 118 checks as towhether the value of the actual bin, i.e. either the already binarysyntax element or one bin of a bin string obtained from the currentsyntax element, is equal to the most probable symbol as indicated byω_(i) or not If the current bin is the MPS, L needs not to be updatedand the process transitions to step 338, where context modeler 112updates the probability estimation state of the current context model byupdating σ_(i). In particular, context modeler 112 uses a table 340which associates each probability state index σ with an updatedprobability state index in case the actual symbol or bin was the mostprobable symbol, i.e., σ becomes transIdxMPS (σ_(i)).

After step 338, the process ends at 340 where bits or a bit are added tothe bit stream if possible. To be more specific, a bit or bits are addedto the bit stream in order to indicate a probability value falling intothe current interval as defined by R and L. In particular, step 340 isperformed such that at the end of a portion of the arithmetic coding ofa precoded video signal, such as the end of a slice, the bit streamdefines a codeword defining a value that falls into the interval[L,L+R), thereby uniquely identifying to the decoder the bin valueshaving been encoded into the codeword. Preferably, the codeword definesthe value within the current interval having the shortest bit length. Asto whether a bit or bits are added to the bit stream in step 340 or not,depends on the fact as to whether the value indicated by the bit streamwill remain constant even if the actual interval is further sub-dividedwith respect to subsequent bins, i.e. as to whether the respective bitof the representation of the value falling in the current interval doesnot change whatever subdivisions will come. Furthermore, renormalizationis performed in step 340, in order to keep R and L represent the currentinterval within a predetermined range of values.

If in step 336 it is determined that the current bin is the leastprobable symbol LPS, the regular coding engine 118 actualizes thecurrent encoder state R and L in step 342 by amending L to be L+R and Rto be R_(LPS). Then, if σ_(i) is equal to 0, i.e. if the probabilitystate index indicates equal probability for both, 1 and 0, in step 344,the value MPS is updated by computing ω_(i)=1−ω_(i). Thereafter, in step346, the probability state index is actualized by use of table 340,which also associates each current probability state index with anupdated probability state index in case the actual bin value is theleast probable symbol, i.e., amending σ_(i) to becometransIdxLPS(σ_(i)). After the probability state index σ_(i) and ω_(i)has been adapted in steps 344 and 346, the process steps to step 340which has already been described.

After having described the encoding process of syntax elements byexploiting the spatial relationship between syntax element ofneighboring blocks for context model assignment, the context modelassignment and the definition of the neighborhood between a current anda neighboring block is described in more detail below with respect tothe following syntax elements contained in the precoded video signal asoutput by precoder 12. These syntax elements are listed below.

Name of the syntax element Meaning of the syntax element Mb_skip_flagThis flag relates to a certain macroblock of a certain slice of a videoframe. Mb_skip_flag equal to 1 specifies that the current macroblock isto be skipped when performing a decoding process on the precoded videosignal. Mb_skip_flag equal to 0 specifies that the current macroblock isnot skipped. In particular, in the H.264/AVC standard, Mb_skip_flagequal to 1 specifies that for the current macroblock, when decoding a Por SP slice, Mb_type is inferred to be p_skip and the macroblock type iscollectively referred to as P macroblock type, and when decoding a Bslice, Mb_type is inferred to be B_skip and the macroblock type iscollectively referred to as B macroblock type. Mb_field_decoding_flagMb_field_decoding_flag equal to 0 specifies that the current macroblockpair is a frame macroblock pair and Mb_field_decoding_flag equal to 0specifies that the macroblock pair is a field macroblock pair. Bothmacroblocks of a frame macroblock pair are referred to in the presentdescription as frame macroblocks, whereas both macroblocks of a fieldmacroblock pair are referred to in this text as field macroblocks.Mb_type Mb_type specifies the macroblock type. For example, thesemantics of Mb_type in the H.264/AVC standard depends on the slicetype. Depending on the slice type, Mb_type can assume values in therange of 0 to 25, 0 to 30, 0 to 48 or 0-26, depending on the slice type.Coded_block_pattern Coded_block_pattern specifies which of a sub-part ofthe current macroblock contains non-zero transform coefficients.Transform coefficients are the scalar quantities, considered to be in afrequency domain, that are associated with a particular one-dimensionalor two-dimensional frequency index in an inverse transform part of thedecoding process. To be more specific, each macroblock 10a -irrespective of the macroblock being a frame coded macroblock (FIG. 4a)or a field coded macroblock (FIG. 4b), is partitioned into smallersub-parts, the sub-parts being arrays of size 8 × 8 pixel samples.Briefly referring to FIG. 4a, the pixels 1 to 8, 11 to 18, 21 to 28, . .. , 71 to 78 could form the upper left block of luma pixel samples inthe top macroblock 250 of macroblock pair 10b. This top macroblock 250would comprise another three of such blocks, all four blocks arranged ina 2 × 2 array. The same applies for the bottom macroblock 252 and alsoapplies for field coded macroblocks as shown in FIG. 4b, where, forexample, pixels 1 to 8, 21 to 28, 41 to 48, . . . , 141 to 148 wouldform the upper left block of the top macroblock. Thus, for eachmacroblock coded, the precoded video signal output by precoder 12 wouldcomprise one or several syntax elements coded_block_pattern. Thetransformation from spatial domain to frequency domain, could beperformed on these 8 × 8 sub-parts or on some smaller units, forexample, 4 × 4 sub-arrays, wherein each 8 × 8 sub-part comprises 4smaller 4 × 4 partitions. The present description mainly concerns lumapixel samples. Nevertheless, the same could also apply accordingly forchroma pixel samples. ref_Idx_10/ This syntax element concerns theprediction of ref_Idx_11 the pixel samples of a macroblock duringencoding and decoding. In particular, ref_Idx_10, when present in theprecoded video signal output by precoder 12, specifies an index in alist 0 of a reference picture to be used for prediction. The sameapplies for ref_Idx_11 but with respect to another list of the referencepicture. mvd_10/mvd_11 mvd_10 specifies the difference between a vectorcomponent to be used for motion prediction and the prediction of thevector component. The same applies for mvd_11, the only differencebeing, that same are applied to different reference picture lists.ref_Idx_10, ref_Idx_11, mvd_10 and mvd_11 all relate to a particularmacroblock partition. The partitioning of the macroblock is specified byMb_type. intra_chroma_pred_mode Intra_chroma_pred_mode specifies thetype of spatial prediction used for chroma whenever any part of the lumamacroblock is intra-coded. In intra prediction, a prediction is derivedfrom the decoded samples of the same decoded picture or frame. Intraprediction is contrary to inter prediction where a prediction is derivedfrom decoded samples of reference pictures other than the currentdecoded picture. coded_block_flag coded_block_flag relates to blocks ofthe size of 4 × 4 picture samples. If coded_block_flag is equal to 0,the block contains no non-zero transform coefficients. Ifcoded_block_flag is equal to 1, the block contains at least one non-zerotransform coefficient.

As can be gathered from the above table, some of these syntax elementsrelate to a current macroblock in the whole, whereas others relate tosub-parts, i.e., sub-macroblocks or partitions thereof, of a currentmacroblock. In a similar way, the assignment of a context model to thesesyntax elements is dependent on syntax elements of either neighboringmacroblocks, neighboring sub-macroblocks or neighboring partitionsthereof. FIG. 9 illustrates the partition of macroblocks (upper row) andsub-macroblocks (lower row). The partitions are scanned for interprediction as shown in FIG. 9. The outer rectangles in FIG. 9 refer tothe samples in a macroblock or sub-macroblock, respectively. The innerrectangles refer to the partitions. The number in each inner rectanglespecifies the index of the inverse macroblock partition scan or inversesub-macroblock partition scan.

Before describing in detail the dependency of the context modelassignment on the syntax element of neighboring blocks, with respect toFIG. 7, it is described, how the addresses of the top macroblock of themacroblock pair to the left and above the current macroblock pair may becomputed, since these are the possible candidates, which comprise thesyntax element in the block to the left of and above the current blockcontaining the current syntax element to be arithmetically encoded. Inorder to illustrate the spatial relationships, in FIG. 7, a portion ofsix macroblock pairs of a video frame is shown, wherein each rectangleregion in FIG. 7 corresponds to one macroblock and the first and thesecond two vertically adjacent macroblocks in each column form amacroblock pair.

In FIG. 7, CurrMbAddr denotes the macroblock address of the topmacroblock of the current macroblock pair, the current syntax element isassociated with or relates to. The current macroblock pair isencompassed by bold lines. In other words, they from the border of amacroblock pair. mbAddrA and mbAddrB denote the addresses of the topmacroblocks of the macroblock pairs to the left and above the currentmacroblock pair, respectively.

In order to compute the addresses of the top macroblock of theneighboring macroblock pair to the left and above the current macroblockpair, context modeler 112 computes

MbAddrA=2·(CurrMbAddr/2−1)

MbAddrB=2·(CurrMbAddr/2−PicWidthInMbs)

where PicWidthInMbs specifies the picture within units of macroblocks.The equations given above can be understood by looking at FIG. 3. It isnoted that in FIG. 3 the picture width in units of macroblocks has beendenoted i. It is further noted that the equations given above are alsotrue when the current macroblock address CurrMbAddress is interchangedwith the odd numbered macroblock address of the bottom macroblock of thecurrent macroblock pair, i.e., CurrMbAddress+1, because in the equationabove, “/” denotes an integer division with transaction of the resulttowards zero. For example, 7/4 and −7/−4 are truncated to 1 and −7/4 and7/−1 are truncated to −1.

Now, after having described how to compute neighboring macroblocks, itis briefly recalled that each macroblock contains 16×16 luma samples.These luma samples are divided up into four 8×8 luma blocks. These lumablocks may be further subdivided into 4×4 luma blocks. Furthermore, forthe following description, each macroblock further comprises 8×8 lumasamples, i.e., the pixel width of the chroma samples being doubledcompared to luma samples. These 8×8 chroma samples of a macroblock aredivided up into four 4×4 luma blocks. The blocks of a macroblock arenumbered. Accordingly, the four 8×8 luma blocks each have a respectiveblock address uniquely indicating each 8×8 block in the macroblock.Next, each pixel sample in a macroblock belongs to a position (x, y)wherein (x, y) denotes the luma or chroma location of the upper-leftsample of the current block in relation to the upper-left luma or chromasample of the macroblock. For example, with respect to luma samples, thepixel 23 in top macroblock 252 in FIG. 4 b would have the pixel position(2, 1), i.e., third column, second row. After having described this, thederivation process of ctxIdx for at least some of the bins of syntaxelements listed in the above table is described.

With respect to the syntax element mb_skip_flag, the context modelerassignment depends on syntax elements relating to neighboringmacroblocks. Thus, in order to determine the context index ctxIdx theaddresses mbAddrA and mbAddrB are determined as described above. Then,let condTermN (with N being either A or B) be a variable that is set asfollows:

-   -   If mbAddrN is not available or mb_skip_flag for the macroblock        mbAddrN is equal to 1, conTermN is set to 0    -   Otherwise, condTermN is set to 1.

ctxIdx is derived based on an context index incrementorctxIdxInc=conTermA+condTermB.

For the syntax element mb field decoding_flag, ctxIdx is determined asfollows:

Let condTermN (with N being either A or B) be a variable that is set asfollows.

-   -   If any of the following conditions is true, then condTermN is        set to 0,        -   mbAddrN is not available        -   the macroblock mbAddrN is a frame macroblock.    -   Otherwise, condTermN is set to 1.

ctxIdx is derived based on an context index incrementorctxIdxInc=condTermA+condTermB

wherein mbaddrN is not available, if

(((CurrMbAddr/2)%(PicWidthInMbs))==0).

For the syntax element Mb_type, ctxIdx is determined dependent on theavailability of macroblocks mbAddrN (with N being either A or B), andthe syntax element Mb_type of this neighboring macroblocks.

With respect to the other syntax element listed in the above table, thedependency of the context modeler assignment is defined accordingly,wherein for syntax elements, which relate to blocks smaller than amacroblock, the assignment is also dependent on syntax element relatingto such smaller blocks being smaller than macroblocks. For example, forthe syntax element coded_block_pattern, the context index assignment isdependent not only on the availability of macroblock MbAddrN and thesyntax element Mb_type of the macroblock MbAddrN but also on the syntaxelement Coded_block_pattern of the neighboring block. Further, it isworth noting that the syntax elements listed above are all dependent onthe respective syntax element of the neighboring block. Differingthereto, the context model assignment of syntax elements mvd_(—)10,mvd_(—)11, ref_idx_(—)10 and ref_idx_(—)11 is not dependent on therespective syntax elements of the neighboring block. The context modelerassignment for intra_chroma_pred_mode is dependent on mbAddrNavailability, macroblock mbAddrN being coded in inter prediction mode ornot, Mb_type for the macroblock mbAddrN and the syntax elementintra_chroma_pred_mode for the macroblock MbAddrN. The syntax elementcoded_block_flag context model assignment is dependent on theavailability of MbAddrN, the current macroblock being coded in interprediction mode, Mb_type for the macroblock mbAddrN and the syntaxelement coded_block_flag of the neighboring block.

In the following, it is described, how a neighboring block isdetermined. In particular, this involves computing mbAddrN and the blockindex indexing the sub-part of the macroblock MbAddrN, this sub-partbeing the neighboring block of the current block.

The neighborhood for slices using macroblock adaptive frames/fieldcoding as described in the following in accordance with an embodiment ofthe present invention is defined in a way that guarantees that the areascovered by neighboring blocks used for context modeling in contextadaptive binary arithmetic coding inside an MBAFF-frame adjoin to thearea covered by the current block. This generally improves the codingefficiency of a context adaptive arithmetic coding scheme as it is usedhere in connection with the coding of MBAFF-slices in comparison toconsidering each macroblock pair as frame macroblock pair for thepurpose of context modeling as described in the introductory portion ofthe specification, since the conditional probabilities estimated duringthe coding process are more reliable.

The general concept of defining the neighborhood between a current and areference block is described in the following section 1.1. In section1.2, a detailed description, which specifies how the neighboring blocks,macroblocks, or partitions to the left of and above the current block,macroblock, or partition are obtained for the purpose of contextmodeling in context adaptive binary arithmetic coding, is given.

1.1. General Concept Neighborhood Definition

Let (x, y) denote the luma or chroma location of the upper-left sampleof the current block in relation to the upper-left luma or chroma sampleof the picture CurrPic. The variable CurrPic specifies the currentframe, which is obtained by interleaving the top and the bottom field,if the current block is part of a macroblock pair coded in frame mode(mb_field_decoding_flag is equal to 0). If the current block is or ispart of a top field macroblock, CurrPic specifies the top field of thecurrent frame; and if the current block is or is part of a bottom fieldmacroblock, CurrPic specifies the bottom field of the current frame.

Let (xA, yA) and (xB, yB) denote the luma or chroma location to the leftof and above the location (x, y), respectively, inside the pictureCurrPic. The locations (xA, yA) and (xB, yB) are specified by

(xA, yA)=(x−1, y)

(xB, yB)=(x, y−1)

The block to the left of the current block is defined as the block thatcontains the luma or chroma sample at location (xA, yA) relative to theupper-left luma or chroma sample of the picture CurrPic and the blockabove the current block is defined as the block that contains the lumaor chroma sample at location (xB, yB) relative to the upper-left luma orchroma sample of the picture CurrPic. If (xA, yA) or (xB, yB) specify alocation outside the current slice, the corresponding block is marked asnot available.

1.2. Detailed Description of Neighborhood Definition

The algorithm described in Sec. 1.2.1 specifies a general concept forMBAFF-slices that describes how a luma sample location expressed inrelation to the upper-left luma sample of the current macroblock ismapped onto a macroblock address, which specifies the macroblock thatcovers the corresponding luma sample, and a luma sample locationexpressed in relation to the upper-left luma sample of that macroblock.This concept is used in the following Sec. 1.2.2-1.2.6.

The Sec. 1.2.2-1.2.6 describe how the neighboring macroblocks, 8×8 lumablocks, 4×4 luma blocks, 4×4 chroma block, and partitions to the left ofand above a current macroblock, 8×8 luma block, 4×4 luma block, 4×4chroma block, or partition are specified. These neighboring macroblock,block, or partitions are needed for the context modeling of CABAC forthe following syntax elements: mb_skip_flag, mb_type,coded_block_pattern, intra_chroma_pred_mode, coded block flag, refidx_(—)10, ref_idx_(—)11, mvd_(—)10, mvd_(—)11.

1.2.1 Specification of Neighboring Sample Locations

Let (xN, yN) denote a given luma sample location expressed in relationto the upper-left luma sample of the current macroblock with themacroblock address CurrMbAddr. It is recalled that in accordance withthe present embodiment each macroblock comprises 16×16 luma samples. xNand yN lie within −1 . . . 16. Let mbAddrN be the macroblock address ofthe macroblock that contains (xN, yN), and let (xW,yW) be the, location(xN, yN) expressed in relation to the upper-left luma sample of themacroblock mbAddrN (rather than relative to the upper-left luma sampleof the current macroblock).

Let mbAddrA and mbAddrB specify the macroblock address of the topmacroblock of the macroblock pair to the left of the current macroblockpair and the top macroblock of the macroblock pair above the currentmacroblock pair, respectively. Let PicWidthInMbs be a variable thatspecifies the picture width in units of macroblocks. mbAddrA and mbAddrBare specified as follows.

-   -   mbAddrA=2*(CurrMbAddr/2−1)    -   If mbAddrA is less than 0, or if (CurrMbAddr/2) % PicWidthInMbs        is equal to 0, or if the macroblock with address mbAddrA belongs        to a different slice than the current slice, mbAddrA is marked        as not available.    -   mbAddrB=2*(CurrMbAddr/2−PicWidthInMbs)    -   If mbAddrB is less than 0, or if the macroblock with address        mbAddrB belongs to a different slice than the current slice,        mbAddrB is marked as not available.

The Table in FIG. 8 specifies the macroblock address mbAddrN and avariable yM in the following two ordered steps:

1. Specification of a macroblock address mbAddrX (fifth column)depending on (xN, yN) (first and second column) and the followingvariables:

-   -   The variable currMbFrameFlag (third column) is set to 1, if the        current macroblock with address CurrMbAddr is a part of a frame        macroblock pair; otherwise it is set to 0.    -   The variable mb1sTopMbFlag (forth column) is set to 1, if        CurrMbAddr %2 is equal to 0; otherwise it is set to 0.    -   2. Depending on the availability of mbAddrX (fifth column), the        following applies:    -   If mbAddrX (which can be either mbAddrA or mbAddrB) is marked as        not available, mbAddrN is marked as not available.    -   Otherwise (mbAddrX is available), mbAddrN is marked as available        and Table 1 specifies mbAddrN and yM depending on (xN, yN)        (first and second column), currMbFrameFlag (third column),        mblsTopMbFlag (forth column), and the variable mbAddrXFrameFlag        (sixth column), which is derived as follows:        -   mbAddrXFrameFlag is set to 1, if the macroblock mbAddrX is a            frame macroblock; otherwise it is set to 0.

Unspecified values of the above flags in Table 1 indicate that the valueof the corresponding flags is not relevant for the current table rows.

To summarize: in the first four columns, the input values xN, yN,currMbFrameFlag and MblsTopMbFlag are entered. In particular, thepossible input values for parameters xN and yN are −1 to 16, inclusive.These parameters determine mbAddrX listed in the fifth column, i.e. themacroblock pair containing the wanted luma sample. The next two columns,i.e., the sixth and the seventh column, are needed to obtain the finaloutput mbAddrN and yN. These further input parameters areMbAddrXFrameFlag indicating as to whether a macroblock pair indicated bymbAddrX is frame or field coded, and some additional conditionsconcerning as to whether yN is even or odd numbered or is greater thanor equal to 8 or not.

As can be seen, when xN and yN are both positive or zero, i.e., thewanted pixel sample lies within the current macroblock relative to whichxN and yN are defined, the output macroblock address does not change,i.e., it is equal to CurrMbAddr. Moreover, yM is equal yM. This changeswhen the input xM and yM indicates a pixel sample lying outside thecurrent macroblock, i.e., to the left (xN<0) all to the top of thecurrent macroblock (yN<0).

Outgoing from the result of the table of FIG. 8, the neighboring lumalocation (xW, yW) relative to the upper-left luma sample of themacroblock-mbAddrN is specified as

xW=(xN+16)%16

yW=(yM+16)%16.

It is emphasized that the aforementioned considerations pertained forillustrative purposes merely luma samples. The considerations areslightly different when considering chroma samples since a macroblockcontains merely 8×8 chroma samples.

1.2.2 Specification of Neighboring Macroblocks

The specification of the neighboring macroblocks to the left of andabove the current macroblock is used for the context modeling of CABACfor the following syntax elements: mb_skip_flag, mb_type,coded_block_pattern, intra_chroma_prediction mode, and coded_block_flag.

Let mbAddrA be the macroblock address of the macroblock to the left ofthe current macroblock, and mbAddrB be the macroblock address of themacroblock above the current macroblock.

mbAddrA, mbAddrB, and their availability statuses are obtained asfollows:

-   -   mbAddrA and its availability status are obtained as described in        Sec. 1.2.1 given the luma location (xN, yN)=(−1, 0).    -   mbAddrB and its availability status are obtained as described in        Sec. 1.2.1 given the luma location (xN, yN)=(0, −1).        1.2.3 Specification of neighboring 8×8 luma blocks

The specification of the neighboring 8×8 luma blocks to the left of andabove the current 8×8 luma block is used for the context modeling ofCABAC for the syntax element coded_block_pattern.

Let luma8×8BlkIdx be the index of the current 8×8 luma block inside thecurrent macroblock CurrMbAddr. An embodiment of the assignment of blockindex luma8×8BlkIdx to the respective blocks within a macroblock isshown in FIG. 9 (upper-right corner).

Let mbAddrA be the macroblock address of the macroblock that containsthe 8×8 luma block to the left of the current 8×8 luma block, and letmbAddrB be the macroblock address of the macroblock that contains the8×8 luma block above the current 8×8 luma block. Further, letluma8×8BlkIdxA be the 8×8 luma block index (inside the macroblockmbAddrA) of the 8×8 luma block to the left of the current 8×8 lumablock, and let luma8×8BlkIdXB be the 8×8 luma block index (inside themacroblock mbAddrB) of the 8×8 luma block above the current 8×8 lumablock.

mbAddrA, mbAddrB, luma8×8BlkIdxA, luma8×8BlkIdxB, and their availabilitystatuses are obtained as follows:

-   -   Let (xC, yC) be the luma location of the upper-left sample of        the current 8×8 luma block relative to the upper-left luma        sample of the current macroblock.    -   mbAddrA, its availability status, and the luma location (xW, yW)        are obtained as described in Sec. 1.2.1 given the luma location        (xN, yN)=(xC −1, yC). If mbAddrA is available, then        luma8×8BlkIdxA is set in a way that it refers to the 8×8 luma        block inside the macroblock mbAddrA that covers the luma        location (xW, yW); otherwise, luma8×8BlkIdA is marked as not        available.    -   mbAddrB, its availability status, and the luma location (xW, yW)        are obtained as described in Sec. 1.2.1 given the luma location        (xN, yN)=(xC, yC −1). If mbAddrB is available, then        luma8×8BlkIdxB is set in a way that it refers to the 8×8 luma        block inside the macroblock mbAddrB that covers the luma        location (xW, yW); otherwise,    -   luma8×8BlkIdxB is marked as not available.

1.2.4 Specification of Neighboring 4×4 Luma Blocks

The specification of the neighboring 4×4 luma blocks to the left of andabove the current 4×4 luma block is used for the context modeling ofCABAC for the syntax element coded_block_flag.

Let luma4×4BlkIdx be the index (in decoding order) of the current 4×4luma block inside the current macroblock CurrMbAddr. For example,luma4×4BlkIdx could be defined as luma8×8BlkIdx of the 8×8 blockcontaining the 4×4 block multiplied by 4 plus the partition number asshown in the bottom-right corner of FIG. 9.

Let mbAddrA be the macroblock address of the macroblock that containsthe 4×4 luma block to the left of the current 4×4 luma block, and letmbAddrB be the macroblock address of the macroblock that contains the4×4 luma block above the current 4×4 luma block. Further, letluma4×4BlkIdxA be the 4×4 luma block index (inside the macroblockmbAddrA) of the 4×4 luma block to the left of the current 4×4 lumablock, and let luma4×4BlkIdxB be the 4×4 luma block index (inside themacroblock mbAddrB) of the 4×4 luma block above the current 4×4 lumablock.

mbAddrA, mbAddrB, luma4×4BlkIdxA, luma4×4BlkIdxB, and their availabilitystatuses are obtained as follows:

-   -   Let (xC, yC) be the luma location of the upper-left sample of        the current 4×4 luma block relative to the upper-left luma        sample of the current macroblock.    -   mbAddrA, its availability status, and the luma location (xW, yW)        are obtained as described in Sec. 1.2.1 given the luma location        (xN, yN)=(xC −1, yC) if mbAddrA is available, then        luma4×4BlkIdxA is set in a way that it refers to the 4×4 luma        block inside the macroblock mbAddrA that covers the luma        location (xW, yW); otherwise, luma4×4BlkIdxA is marked as not        available.    -   mbAddrB, its availability status, and the luma location (xW, yW)        are obtained as described in Sec. 1.2.1 given the luma location        (xN, yN)=(xC, yC −1). If mbAddrB is available, then        luma4×4BlkIdxB is set in a way that it refers to the 4×4 luma        block inside the macroblock mbAddrB that covers the luma        location (xW, yW); otherwise, Iuma4×4BlkIdxB is marked as not        available.

1.2.5 Specification of Neighboring 4×4 Chroma Blocks

The specification of the neighboring 4×4 chroma blocks to the left ofand above the current 4×4 chroma block is used for the context modelingof CABAC for the syntax element coded_block_flag.

Let chroma4×4BlkIdx be the index (in decoding order) of the current 4×4chroma block inside the current macroblock CurrMbAddr.

Let mbAddrA be the macroblock address of the macroblock that containsthe 4×4 chroma block to the left of the current 4×4 chroma block, andlet mbAddrB be the macroblock address of the macroblock that containsthe 4×4 chroma block above the current 4×4 chroma block. Further, letchroma4×4BlkIdxA be the 4×4 chroma block index (inside the macroblockmbAddrA) of the 4×4 chroma block to the left of the current 4×4 chromablock, and let chroma 4×4BlkIdxB be the 4×4 chroma block index (insidethe macroblock mbAddrB) of the 4×4 chroma block above the current 4×4chroma block.

mbAddrA, mbAddrB, chroma4×4BlkIdxA, chroma4×4BlkIdxB, and theiravailability statuses are obtained as follows:

-   -   Given luma8×8BlkIdx=chroma4×4BlkIdx, the variables mbAddrA,        mbAddrB, luma8×8BlkIdxA, luma8×8BlkIdxB, and their availability        statuses are obtained as described in Sec. 1.2.3.    -   If luma8×8BlkIdxA is available, chroma4×4BlkIdxA is set equal to        luma8×8BlkIdxA; otherwise chroma4×4BlkIdxA is marked as not        available.    -   If luma8×8BlkIdxB is available, chroma4×4BlkIdxB is set equal to        luma8×8BlkIdxB; otherwise chroma4×4BlkIdxB is marked as not        available.

1.2.6 Specification of Neighboring Partitions

The specification of the neighboring partitions to the left of and abovethe current partition is used for the context modeling of CABAC for thefollowing syntax elements: ref_idx_(—)10, ref_idx_(—)11, mvd_(—)10,mvd_(—)11.

Let mbPartIdx and subMbPartIdx be the macroblock partition andsub-macroblock partition indices that specify the current partitioninside the current macroblock CurrMbAddr. An example for such partitionindices is shown in FIG. 9.

Let mbAddrA be the macroblock address of the macroblock that containsthe partition to the left of the current partition, and let mbAddrB bethe macroblock address of the macroblock that contains the partitionabove the current partition. Further, let mbPartIdxA and subMbPartIdxAbe the macroblock partition and sub-macroblock partition indices (insidethe macroblock mbAddrA) of the partition to the left of the currentpartition, and let mbPartIdxB and subMbPartIdxB be the macroblockpartition and sub-macroblock partition indices (inside the macroblockmbAddrB) of the partition above the current partition.

mbAddrA, mbAddrB, mbPartIdxA, subMbPartIdxA, mbPartIdxB, subMbPartIdxB,and their availability statuses are obtained as follows:

-   -   Let (xC, yC) be the luma location of the upper-left sample of        the current partition given by mbPartIdx and subMbPartIdx        relative to the upper-left luma sample of the current        macroblock.    -   mbAddrA, its availability status, and the luma location (xW, yW)        are obtained as described in Sec. 1.2.1 given the luma location        (xN,yN)=(xC−1, yC). If mbAddrA is not available, mbPartIdxA and        subMbPartIdxA are marked as not available; otherwise mbPartIdxA        is set in a way that it refers to the macroblock partition        inside the macroblock mbAddrA that covers the luma location (xW,        yW), and subMbPartIdxA is set in a way that it refers to the        sub-macroblock partition inside the macroblock partition        mbPartIdxA (inside the macroblock mbAddrA) that covers the luma        location (xW, yW).    -   mbAddrB, its availability status, and the luma location (xW, yW)        are obtained as described in Sec. 1.2.1 given the luma location        (xN, yN)=(xC, yC −1). If mbAddrB is not available, mbPartIdxB        and subMbPartIdxB are marked as not available; otherwise        mbPartIdxB is set in a way that it refers to the macroblock        partition inside the macroblock mbAddrB that covers the luma        location (xW, yW), and subMbPartIdxB is set in a way that it        refers to the sub-macroblock partition inside the macroblock        partition mbPartIdxB (inside the macroblock mbAddrB) that covers        the luma location (xW, yW).

After having described how to encode the above syntax elements or thebin strings or part of their bins into an arithmetically coded bitstream, the decoding of said bit stream and the retrieval of the bins isdescribed with respect to FIGS. 10 to 12

FIG. 10 shows a general view of a video decoder environment to which thepresent invention could be applied. An entropy decoder 400 receives thearithmetically coded bit stream as described above and treats it as willbe described in more detail below with respect to FIGS. 11-12. Inparticular, the entropy decoder 400 decodes the arithmetically coded bitstream by binary arithmetic decoding in order to obtain the precodedvideo signal and, in particular, syntax elements contained therein andpasses same to a precode decoder 402. The precode decoder 402 uses thesyntax elements, such as motion vector components and flags, such as theabove listed syntax elements, in order to retrieve, macroblock bymacroblock and then slice after slice, the picture samples of pixels ofthe video frames 10.

FIG. 11 now shows the decoding process performed by the entropy decoder400 each time a bin is to be decoded. Which bin is to be decoded dependson the syntax element which is currently expected by entropy decoder400. This knowledge results from respective parsing regulations.

In the decoding process, first, in step 500, the decoder 400 checks asto whether the next bin to decode is a bin of a syntax element of thetype corresponding to context model assignment based on neighboringsyntax elements. If this is not the case, decoder 400 proceeds toanother syntax element handling in step 504. However, if the checkresult in step 500 is positive, decoder 400 performs in steps 506 and508 a determination of the neighboring block of the current block whichthe current bin to decode belongs to and an assignment of a contextmodel to the bin based on a predetermined attribute of the neighboringblock determined in step 506, wherein steps 506 and 508 correspond tosteps 306 and 308 of encoding process of FIG. 5. The result of thesesteps is the context index ctxIdx. Accordingly, the determination ofctxIdx is performed in steps 506 and 508 in the same way as in theencoding process of FIG. 5 in steps 306 and 308 in order to determinethe context model to be used in the following arithmetical decoding.

Then, in step 522, the entropy decoder 400 arithmetically decodes theactual bin, from the arithmetically coded bit stream by use of theactual probability state of the context module as indexed by ctxIdxobtained in steps 510 to 520. The result of this step is the value forthe actual bin. Thereafter, in step 524, the ctxIdx probability state isadapted or updated, as it was the case in step 224. Thereafter, theprocess ends at step 526.

Of course, the individual bins that are obtained by the process shown inFIG. 11 represent the syntax element value merely in case the syntaxelement is of a binary type. Otherwise, a step corresponding to thebinarization has to be performed in reverse manner in order to obtainfrom the bin strings the actual value of the syntax element.

FIG. 12 shows the steps 522 and 524 being encompassed by dotted line 527in more detail on the left hand side. On the right hand side, indicatedwith 564, FIG. 11 shows a memory and its content to which entropydecoder 400 has access in order to load, store and update variables. Ascan be seen, entropy decoder manipulates or manages the same variablesas entropy coder 14 since entropy decoder 400 emulates the encodingprocess as will be described in the following.

In a first step 566, decoder 400 determines the value R_(LPS), i.e. therange of the subinterval corresponding to the next bin being the LPS,based on R and σ_(i). Thus, step 566 is identical to step 330. Then, instep 568, decoder 400 computes R_(MPS)=R−R_(LPS) with R_(MPS) being therange of the subinterval associated with the most probable symbol. Thecurrent interval from L to R is thus subdivided into subintervals L toL+R_(MPS) and L+R_(MPS) to L+R. Now, in step 570 decoder 400 checks asto whether the value of the arithmetic coding codeword in thearithmetically coded bit stream falls into the lower or uppersubinterval. The decoder 400 knows that the actual symbol bin, is themost probable symbol as indicated by ω_(i) when the value of thearithmetic codeword falls into the lower subinterval and accordinglysets the bin value to the value of ω_(i) in step 572. In case the valuefalls into the upper subinterval, decoder 400 sets the symbol to be1−ω_(i) in step 574. After step 572, the decoder 400 actualizes thedecoder state or the current interval as defined by R and L by setting Rto be R_(MPS) in step 574. Then, in step 576, the decoder 400 adapts orupdates the probability state of the current context model i as definedby σ_(i) and ω_(i) by transitioning the probability state index σ_(i) aswas described with respect to step 338 in FIG. 9. Thereafter, theprocess 527 ends at step 578.

After step 574, the decoder actualizes the decoder state in step 580 bycomputing L=L+R and R=R_(LPS). Thereafter, the decoder 400 adapts orupdates the probability state in steps 582 and 584 by computingω_(i)=1−ω_(i) in step 582, if σ_(i) is equal to 0, and transitioning theprobability state index σ_(i) to a new probability state index in thesame way as described with respect to step 346 in FIG. 9. Thereafter,the process ends at step 578.

After having described the present invention with respect to thespecific embodiments, it is noted that the present invention is notrestricted to these embodiments. In particular, the present invention isnot restricted to the specific examples of syntax elements. Moreover,the assignment in accordance with steps 308 and 408 does not have to bedependent on syntax elements of neighboring blocks, i.e., syntaxelements contained in the precoded video signal output by precoder 12.Rather, the assignment may be dependent on other attributes of theneighboring blocks. Moreover, the definition of neighborhoods betweenneighboring blocks is described with respect to the table of FIG. 8 maybe varied. Further, the pixel samples of the two interlaced fields couldbe arranged in another way than described above.

Moreover, other block sizes than 4×4 blocks could be used as a basis forthe transformation, and, although in the above embodiment thetransformation was applied to picture sample differences to aprediction, the transformation could be as well applied to the picturesample itself without performing a prediction. Furthermore, the type oftransformation is not critical. DCT could be used as well as a FFT orwavelet transformation. Furthermore, the present invention is notrestricted to binary arithmetic encoding/decoding. The present inventioncan be applied to multi-symbol arithmetic encoding as well.Additionally, the sub-divisions of the video frame into slices,macroblock pairs, macroblocks, picture elements etc. was forillustrating purposes only, and this is not to restrict the scope of theinvention to this special case.

In the following, reference is made to FIG. 13 to show, in more detailthan in FIG. 1, the complete setup of a video encoder engine includingan entropy-encoder as it is shown in FIG. 13 in block 800 in which theaforementioned arithmetic coding of syntax elements by use of a contextassignment based on neighboring syntax elements is used. In particular,FIG. 13 shows the basic coding structure for the emerging H.264/AVCstandard for a macroblock. The input video signal is, split intomacroblocks, each macroblock having 16×16 luma pixels. Then, theassociation of macroblocks to slice groups and slices is selected, and,then, each macroblock of each slice is processed by the network ofoperating blocks in FIG. 13. It is to be noted here that an efficientparallel processing of macroblocks is possible, when there are variousslices in the picture. The association of macroblocks to slice groupsand slices is performed by means of a block called coder control 802 inFIG. 13. There exist several slices, which are defined as follows:

-   -   I slice: A slice in which all macroblocks of the slice are coded        using intra prediction.    -   P slice: In addition, to the coding types of the I slice, some        macroblocks of the P slice can also be coded using inter        prediction with at most one motion-compensated prediction signal        per prediction block.    -   B slice: In addition, to the coding types available in a P        slice, some macroblocks of the B slice can also be coded using        inter prediction with two motion-compensated prediction signals        per prediction block.

The above three coding types are very similar to those in previousstandards with the exception of the use of reference pictures asdescribed below. The following two coding types for slices are new:

-   -   SP slice: A so-called switching P slice that is coded such that        efficient switching between different precoded pictures becomes        possible.    -   SI slice: A so-called switching I slice that allows an exact        match of a macroblock in an SP slice for random access and error        recovery purposes.

Slices are a sequence of macroblocks, which are processed in the orderof a raster scan when not using flexible macroblock ordering (FMO). Apicture maybe split into one or several slices as shown in FIG. 15. Apicture is therefore a collection of one or more slices. Slices areself-contained in the sense that given the active sequence and pictureparameter sets, their syntax elements can be parsed from the bit streamand the values of the samples in the area of the picture that the slicerepresents can be correctly decoded without use of data from otherslices provided that utilized reference pictures are identical atencoder and decoder. Some information from other slices maybe needed toapply the deblocking filter across slice boundaries.

FMO modifies the way how pictures are partitioned into slices andmacroblocks by utilizing the concept of slice groups. Each slice groupis a set of macroblocks defined by a macroblock to slice group map,which is specified by the content of the picture parameter set and someinformation from slice headers. The macroblock to slice group mapconsists of a slice group identification number for each macroblock inthe picture, specifying which slice group the associated macroblockbelongs to. Each slice group can be partitioned into one or more slices,such that a slice is a sequence of macroblocks within the same slicegroup that is processed in the order of a raster scan within the set ofmacroblocks of a particular slice group. (The case when FMO is not inuse can be viewed as the simple special case of FMO in which the wholepicture consists of a single slice group.)

Using FMO, a picture can be split into many macroblock-scanning patternssuch as interleaved slices, a dispersed macroblock allocation, one ormore “foreground” slice groups and a “leftover” slice group, or achecker-board type of mapping.

Each macroblock can be transmitted in one of several coding typesdepending on the slice-coding type. In all slice-coding types, thefollowing types of intra coding are supported, which are denoted asIntra_(—)4×4 or Intra_(—)16×16 together with chroma prediction and I_PCMprediction modes.

The Intra_(—)4×4 mode is based on predicting each 4×4 luma blockseparately and is well suited for coding of parts of a picture withsignificant detail. The Intra_(—)16×16 mode, on the other hand, doesprediction of the whole 16×16 luma block and is more suited for codingvery smooth areas of a picture.

In addition, to these two types of luma prediction, a separate chromaprediction is conducted. As an alternative to Intra-4×4 andIntra_(—)16×16, the I_PCM coding type allows the encoder to simplybypass the prediction and transform coding processes and insteaddirectly send the values of the encoded samples. The I_PCM mode servesthe following purposes:

-   -   1. It allows the encoder to precisely represent the values of        the samples    -   2. It provides a way to accurately represent the values of        anomalous picture content without significant data expansion    -   3. It enables placing a hard limit on the number of bits a        decoder must handle for a macroblock without harm to coding        efficiency.

In contrast to some previous video coding standards (namely H.263+ andMPEG-4 Visual), where intra prediction has been conducted in thetransform domain, intra prediction in H.264/AVC is always conducted inthe spatial domain, by referring to the bins of neighboring samples ofpreviously coded blocks which are to the left and/or above the block tobe predicted. This may incur error propagation in environments withtransmission errors that propagate due to motion compensation intointer-coded macroblocks. Therefore, a constrained intra coding mode canbe signaled that allows prediction only from intra-coded neighboringmacroblocks.

When using the Intra_(—)4×4 mode, each 4×4 block is predicted fromspatially neighboring samples as illustrated on the left-hand side ofFIG. 16. The 16 samples of the 4×4 block, which are labeled as a-p, arepredicted using prior decoded samples in adjacent blocks labeled as A-Q.For each 4×4 block one of nine prediction modes can be utilized. Inaddition, to “DC” prediction (where one value is used to predict theentire 4×4 block), eight directional prediction modes are specified asillustrated on the right-hand side of FIG. 14. Those modes are suitableto predict directional structures in a picture such as edges at variousangles.

In addition, to the intra macroblock coding types, various predictive ormotion-compensated coding types are specified as P macroblock types.Each P macroblock type corresponds to a specific partition of themacroblock into the block shapes used for motion-compensated prediction.Partitions with luma block sizes of 16×16, 16×8, 8×16, and 8×8 samplesare supported by the syntax. In case partitions with 8×8 samples arechosen, one additional syntax element for each 8×8 partition istransmitted. This syntax element specifies whether the corresponding 8×8partition is further partitioned into partitions of 8×4, 4×8, or 4×4luma samples and corresponding chroma samples.

The prediction signal for each predictive-coded M×N luma block isobtained by displacing an area of the corresponding reference picture,which is specified by a translational motion vector and a picturereference index. Thus, if the macroblock is coded using four 8×8partitions and each 8×8 partition is further split into four 4×4partitions, a maximum of sixteen motion vectors may be transmitted for asingle P macroblock.

The quantization parameter SliceQP is used for determining thequantization of transform coefficients in H.264/AVC. The parameter cantake 52 values. Theses values are arranged so that an increase of 1 inquantization parameter means an increase of quantization step size byapproximately 12% (an increase of 6 means an increase of quantizationstep size by exactly a factor of 2). It can be noticed that a change ofstep size by approximately 12% also means roughly a reduction of bitrate by approximately 12%.

The quantized transform coefficients of a block generally are scanned ina zig-zag fashion and transmitted using entropy coding methods. The 2×2DC coefficients of the chroma component are scanned in raster-scanorder. All inverse transform operations in H.264/AVC can be implementedusing only additions and bit-shifting operations of 16-bit integervalues. Similarly, only 16-bit memory accesses are needed for a goodimplementation of the forward transform and quantization process in theencoder.

The entropy encoder 800 in FIG. 13 in accordance with a codingarrangement described above with respect to FIG. 2. A context modelerfeeds a context model, i.e., a probability information, to an arithmeticencoder, which is also referred to as the regular coding engine. The tobe encoded bit, i.e. a bin, is forwarded from the context modeler to theregular coding engine. This bin value is also fed back to the contextmodeler so that a context model update can be obtained. A bypass branchis provided, which includes an arithmetic encoder, which is also calledthe bypass coding engine. The bypass coding engine is operative toarithmetically encode the input bin values. Contrary to the regularcoding engine, the bypass coding engine is not an adaptive coding enginebut works preferably with a fixed probability model without any contextadaption. A selection of the two branches can be obtained by means ofswitches. The binarizer device is operative to binarize non-binaryvalued syntax elements for obtaining a bin string, i.e., a string ofbinary values. In case the syntax element is already a binary valuesyntax element, the binarizer is bypassed.

Therefore, in CABAC (CABAC=Context-based Adaptive Binary ArithmeticCoding) the encoding process consists of at most three elementary steps:

-   -   1. binarization    -   2. context modeling    -   3. binary arithmetic coding

In the first step, a given non-binary valued syntax element is uniquelymapped to a binary sequence, a so-called bin string. When a binaryvalued syntax element is given, this initial step is bypassed, as shownin FIG. 2. For each element of the bin string or for each binary valuedsyntax element, one or two subsequent steps may follow depending on thecoding mode.

In the co-called regular coding mode, prior to the actual arithmeticcoding process the given binary decision, which, in the sequel, we willrefer to as a bin, enters the context modeling stage, where aprobability model is selected such that the corresponding choice maydepend on previously encoded syntax elements or bins. Then, after theassignment of a context model the bin value along with its associatedmodel is passed to the regular coding engine, where the final stage ofarithmetic encoding together with a subsequent model updating takesplace (see FIG. 2).

Alternatively, the bypass coding mode is chosen for selected bins inorder to allow a speedup of the whole encoding (and decoding) process bymeans of a simplified coding engine without the usage of an explicitlyassigned model. This mode is especially effective when coding the binsof the primary suffix of those syntax elements, concerning components ofdifferences of motion vectors and transform coefficient levels.

In the following, the three main functional building blocks, which arebinarization, context modeling, and binary arithmetic coding in theencoder of FIG. 13, along with their interdependencies are discussed inmore detail.

In the following, several details on binary arithmetic coding will beset forth.

Binary arithmetic coding is based on the principles of recursiveinterval subdivision that involves the following elementarymultiplication operation. Suppose that an estimate of the probabilityp_(LPS)ε(0, 0.5] of the least probable symbol (LPS) is given and thatthe given interval is represented by its lower bound L and its width(range) R. Based on that settings, the given interval is subdivided intotwo sub-intervals: one interval of width

R _(LPS) =R×p _(LPS),

which is associated with the LPS, and the dual interval of widthR_(MPS)=R−R_(LPS), which is assigned to the most probable symbol (MPS)having a probability estimate of 1−p_(LPS). Depending on the observedbinary decision, either identified as the LPS or the MPS, thecorresponding sub-interval is then chosen as the new current interval. Abinary value pointing into that interval represents the sequence ofbinary decisions processed so far, whereas the range of the intervalcorresponds to the product of the probabilities of those binary symbols.Thus, to unambiguously identify that interval and hence the codedsequence of binary decisions, the Shannon lower bound on the entropy ofthe sequence is asymptotically approximated by using the minimumprecision of bits specifying the lower bound of the final interval.

An important property of the arithmetic coding as described above is thepossibility to utilize a clean interface between modeling and codingsuch that in the modeling stage, a model probability distribution isassigned to the given symbols, which then, in the subsequent codingstage, drives the actual coding engine to generate a sequence of bits asa coded representation of the symbols according to the modeldistribution. Since it is the model that determines the code and itsefficiency in the first place, it is of importance to design an adequatemodel that explores the statistical dependencies to a large degree andthat this model is kept “up to date” during encoding. However, there aresignificant model costs involved by adaptively estimating higher-orderconditional probabilities.

Suppose a pre-defined set T of past symbols, a so-called contexttemplate, and a related set C={0, . . . , C−1} of contexts is given,where the contexts are specified by a modeling function F. For eachsymbol x to be coded, a conditional probability p(x|F(z)) is estimatedby switching between different probability models according to thealready coded neighboring symbols zεT. After encoding x using theestimated conditional probability p(x|F(z)) is estimated on the fly bytracking the actual source statistics. Since the number of differentconditional probabilities to be estimated for an alphabet size of m ishigh, it is intuitively clear that the model cost, which represents thecost of “learning” the model distribution, is proportional to the numberof past symbols to the power of four.

This implies that by increasing the number C of different contextmodels, there is a point, where overfitting of the model may occur suchthat inaccurate estimates of p(x|F(z)) will be the result.

This problem is solved in the encoder of FIG. 12 by imposing two severerestrictions on the choice of the context models. First, very limitedcontext templates T consisting of a few neighbors of the current symbolto encode are employed such that only a small number of differentcontext models C is effectively used.

Secondly, context modeling is restricted to selected bins of thebinarized symbols and is of especially advantage with respect to primaryprefix und suffix of the motion vector differences and the transformcoefficient levels but which is also true for other syntax elements. Asa result, the model cost is drastically reduced, even though the ad-hocdesign of context models under these restrictions may not result in theoptimal choice with respect to coding efficiency.

Four basic design types of context models can be distinguished. Thefirst type involves a context template with up to two neighboring syntaxelements in the past of the current syntax element to encode, where thespecific definition of the kind of neighborhood depends on the syntaxelement. Usually, the specification of this kind of context model for aspecific bin is based on a modeling function of the related bin valuesfor the neighboring element to the left and on top of the current syntaxelement, as shown in FIG. 13, and as was described above with respect toFIG. 5-12. This design type of context modeling corresponds to the abovedescription.

The second type of context models is only defined for certain datasubtypes. For this kind of context models, the values of prior codedbins (b₀, b₁, b₂, . . . , b_(i-1)) are used for the choice of a modelfor a given bin with index i. Note that these context models are used toselect different models for different internal nodes of a correspondingbinary tree.

Both the third and fourth type of context models is applied to residualdata only. In contrast to all other types of context models, both typesdepend on context categories of different block types. Moreover, thethird type does not rely on past coded data, but on the position in thescanning path. For the fourth type, modeling functions are specifiedthat involve the evaluation of the accumulated number of encoded(decoded) levels with a specific value prior to the current level bin toencode (decode).

Besides these context models based on conditional probabilities, thereare fixed assignments of probability models to bin indices for all thosebins that have to be encoded in regular mode and to which no contextmodel of the previous specified category can be applied.

The above described context modeling is suitable for a video compressionengine such as video compression/decompression engines designed inaccordance with the presently emerging H.264/AVC video compressionstandard. To summarize, for each bin of a bin string the contextmodeling, i.e., the assignment of a context variable, generally dependson the to be processed data type or sub-data type, the precision of thebinary decision inside the bin string as well as the values ofpreviously coded syntax elements or bins. With the exception of specialcontext variables, the probability model of a context variable isupdated after each usage so that the probability model adapts to theactual symbol statistics.

A specific example for a context-based adaptive binary arithmetic codingscheme to which the assignment of context model of the above embodimentscould be applied is described in: D. Marpe, G. Blattermann, and T.Wiegand, “Adaptive codes for H.26L,” ITU-T SG16/Q.6 Doc. VCEG-L13,Eibsee, Germany, January 2003-07-10.

It is noted that the above described steps in the above described flowcharts could be implemented in software, for example in individualroutines, or in Hardware, for example in an ASIC.

While this invention has been described in terms of several preferredembodiments, there are alterations, permutations, and equivalents whichfall within the scope of this invention. It should also be noted thatthere are many alternative ways of implementing the methods andcompositions of the present invention. It is therefore intended that thefollowing appended claims be interpreted as including all suchalterations, permutations, and equivalents as fall within the truespirit and scope of the present invention.

1. A method for encoding a video signal representing at least one videoframe, with the at least one video frame being composed of picturesamples, the picture samples belonging either to a top or a bottom fieldof alternate rows of the video frame, being captured at different timeinstants, the video frame being spatially divided up into macroblockpair regions, each macroblock pair region being associated with a topand a bottom macroblock, the method comprising the following steps:deciding, for each macroblock pair region, as to whether the respectivemacroblock pair region is of a frame coded or a field coded distributiontype; assigning, for each macroblock pair region, each of the pixelsamples in the respective macroblock pair region to a respective one ofthe top and bottom macroblocks of the respective macroblock pair region,in accordance with the distribution type of the respective macroblockpair region, such that, in accordance with the frame coded distributiontype, pixel samples lying in an upper part of the respective macroblockpair region are assigned to the top macroblock and pixel samples lyingin a lower part of the respective macroblock pair region are assigned tothe bottom macroblock, whereas, in accordance with the field codeddistribution type, pixel samples in the respective macroblock pairregion belonging to the top field are assigned to the top macroblock andpixel samples in the respective macroblock pair region belonging to thebottom field are assigned to the bottom macroblock; pre-coding the videosignal into a pre-coded video signal, including motion prediction of themacroblocks in units of partitions thereof to obtain, for eachmacroblock, a syntax element specifying, for a predetermined one of thepartitions of a respective macroblock, an index of a reference picture;determining, for the syntax element of a current macroblock associatedwith a current macroblock pair region of the macroblock pair regions, aneighboring macroblock to the left of the current macroblock at leastbased upon as to whether the current macroblock pair region is of theframe or field coded distribution type, a macroblock pair region to theleft is of the frame or field coded distribution type, and thepredetermined macroblock is the top or bottom macroblock of thepredetermined macroblock pair region such that if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a bottom macroblock of the macroblock pair region tothe left of the predetermined macroblock pair region, if thepredetermined macroblock pair region is of the field coded distributiontype, the macroblock pair region to the left is of the frame codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region;assigning one of at least two context models to the current syntaxelement based on a pre-determined attribute of the neighboringmacroblock, wherein each context model is associated with a differentprobability estimation; and arithmetically encoding the syntax elementof the current macroblock into a coded bit stream based on theprobability estimation with which the assigned context model isassociated.
 2. The method in accordance with claim 1, wherein the stepof determining also comprises determining a neighboring macroblock tothe top of the current macroblock and the step of assigning one of atleast two context models is based on a pre-determined attribute of boththe neighboring macroblock to the top and the neighboring macroblock tothe left of the current macroblock.
 3. A method for decoding apredetermined syntax element among syntax elements of a coded bit streamfrom the coded bit stream, the coded bit stream being an arithmeticallyencoded version of a pre-coded video signal, the pre-coded video signalbeing a pre-coded version of a video signal, the video signalrepresenting at least one video frame being composed of picture samples,the picture samples belonging either to a top or a bottom field ofalternate rows of the video frame, being captured at a different timeinstants, the video frame being spatially divided up into macroblockpair regions, each macroblock pair region being associated with a topand a bottom macroblock, each macroblock pair region being either of aframe coded or a field coded distribution type, wherein, for eachmacroblock pair region, each of the pixel samples in the respectivemacroblock pair region is assigned to a respective one of the top andbottom macroblock of the respective macroblock pair region in accordancewith the distribution type of the respective macroblock pair region suchthat, in accordance with the frame coded distribution type, pixelsamples lying in an upper part of the respective macroblock pair regionare assigned to the top macroblock and pixel samples lying in a lowerpart of the respective macroblock pair region are assigned to the bottommacroblock, whereas, in accordance with the field coded distributiontype, pixel samples in the respective macroblock pair region belongingto the top field are assigned to the top macroblock and pixel samples inthe respective macroblock pair region belonging to the bottom field areassigned to the bottom macroblock, wherein each of the macroblocks isassociated with a respective one of the syntax elements, thepredetermined syntax element relating to a predetermined macroblock ofthe top and bottom macroblocks of a predetermined macroblock pair regionof the macroblock pair regions and specifying, for a predetermined oneof partitions of the predetermined macroblock, an index of a referencepicture used in motion prediction of the predetermined macroblock,wherein the method comprises the following steps being performed by adecoder: determining, for the predetermined syntax element, aneighboring macroblock to the left of the predetermined macroblock, atleast based upon as to whether the predetermined macroblock pair regionis of the frame or field coded distribution type, a macroblock pairregion to the left is of the frame or field coded distribution type, andthe predetermined macroblock is the top or bottom macroblock of thepredetermined macroblock pair region such that if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a bottom macroblock of the macroblock pair region tothe left of the predetermined macroblock pair region, if thepredetermined macroblock pair region is of the field coded distributiontype, the macroblock pair region to the left is of the frame codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region;assigning one of at least two context models to the predetermined syntaxelement based on a predetermined attribute of the neighboringmacroblock, wherein each context model is associated with a differentprobability estimation; and arithmetically decoding the predeterminedsyntax element from the coded bit stream based on the probabilityestimation with which the assigned context model is associated. 4.Method in accordance with claim 3, wherein the assignment of the pixelsamples is such that, in accordance with the frame coded distributiontype, pixel samples lying in an upper part of the respective macroblockpair region are assigned to the top macroblock and pixel samples lyingin a lower part of the respective macroblock pair region are assigned tothe bottom macroblock, whereas, in accordance with the field codeddistribution type, pixel samples in the respective macroblock pairregion belonging to the first field are assigned to the top macroblockand pixel samples in the respective macroblock pair region belonging tothe second field are assigned to the bottom macroblock.
 5. The methodsin accordance with claim 3, wherein the pixel samples belonging to thefirst field and the pixel samples belonging to the second field areinterlaced row-wise so that pixel samples assigned to the top and bottommacroblock of a respective macroblock pair region in accordance with thefield coded distribution type have a greater pitch in row direction thanpixel samples assigned to the top and bottom macroblock of a respectivemacroblock pair region in accordance with the frame coded distributiontype.
 6. Method in accordance with claim 3, wherein the step ofarithmetically decoding comprises: binary arithmetically decoding asequence of the binary decisions belonging to the predetermined syntaxelement, wherein, at least for a predetermined part of the binarydecisions, the decoding is based on the probability estimation withwhich the assigned context model is associated; and reconstructing thepredetermined syntax element from the sequence of binary decisions. 7.An Apparatus for encoding a video signal representing at least one videoframe, with the at least one video frame being composed of picturesamples, the picture samples belonging either to a first or a secondfield being captured at different time instants, the video frame beingspatially divided up into macroblock pair regions, each macroblock pairregion being associated with a top and a bottom macroblock, theapparatus comprising means for deciding, for each macroblock pairregion, as to whether the respective macroblock pair region is of aframe coded or a field coded distribution type; means for assigning, foreach macroblock pair region, each of the pixel samples in the respectivemacroblock pair region to a respective one of the top and bottommacroblocks of the respective macroblock pair region, in accordance withthe distribution type of the respective macroblock pair region; meansfor pre-coding the video signal into a pre-coded video signal, includingmotion prediction of the current macroblock in units of partitionsthereof to obtain, for each macroblock, a syntax element specifying, fora predetermined one of the partitions of the respective macroblock, anindex of a reference picture; means for determining, for the syntaxelement of a current macroblock associated with a current macroblockpair region of the macroblock pair region, a neighboring macroblock tothe left of the current macroblock, at least based upon as to whetherthe current macroblock pair region is of a frame coded or field codeddistribution type, a macroblock pair region to the left is of the frameor field coded distribution type, and the predetermined macroblock isthe top or bottom macroblock of the predetermined macroblock pair regionsuch that if the predetermined macroblock pair region is of the fieldcoded distribution type, the macroblock pair region to the left is alsoof the field coded distribution type, and the predetermined macroblockis the bottom macroblock of the predetermined macroblock pair region,then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be a bottom macroblock of the macroblockpair region to the left of the predetermined macroblock pair region, ifthe predetermined macroblock pair region is of the field codeddistribution type, the macroblock pair region to the left is of theframe coded distribution type, and the predetermined macroblock is thebottom macroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region; meansfor assigning one of at least two context models to the current syntaxelement based on a pre-determined attribute of the neighboringmacroblock, wherein each context model is associated with a differentprobability estimation; and means for arithmetically encoding the syntaxelement of the current macroblock into a coded bit stream based on theprobability estimation with which the assigned context model isassociated.
 8. An apparatus for decoding a predetermined syntax elementamong syntax elements of a coded bit stream from the coded bit stream,the coded bit stream being an arithmetically encoded version of apre-coded video signal, the pre-coded video signal being a pre-codedversion of a video signal, the video signal representing at least onevideo frame being composed of picture samples, the picture samplesbelonging either to a top or a bottom field of alternate rows of thevideo frame, being captured at a different time instants, the videoframe being spatially divided up into macroblock pair regions, eachmacroblock pair region being associated with a top and a bottommacroblock, each macroblock pair region being either of a frame coded ora field coded distribution type, wherein, for each macroblock pairregion, each of the pixel samples in the respective macroblock pairregion is assigned to a respective one of the top and bottom macroblockof the respective macroblock pair region in accordance with thedistribution type of the respective macroblock pair region such that, inaccordance with the frame coded distribution type, pixel samples lyingin an upper part of the respective macroblock pair region are assignedto the top macroblock and pixel samples lying in a lower part of therespective macroblock pair region are assigned to the bottom macroblock,whereas, in accordance with the field coded distribution type, pixelsamples in the respective macroblock pair region belonging to the topfield are assigned to the top macroblock and pixel samples in therespective macroblock pair region belonging to the bottom field areassigned to the bottom macroblock, wherein each of the macroblocks isassociated with a respective one of the syntax elements, thepredetermined syntax element relating to a predetermined macroblock ofthe top and bottom macroblocks of a predetermined macroblock pair regionof the macroblock pair regions and specifying, for a predetermined oneof partitions of the predetermined macroblock, an index of a referencepicture used in motion prediction of the respective macroblock, whereinthe apparatus comprises means for determining, for the predeterminedsyntax element, a neighboring macroblock to the left of thepredetermined macroblock, at least based upon as to whether thepredetermined macroblock pair region is of the frame or field codeddistribution type, a macroblock pair region to the left is of the frameor field coded distribution type, and the predetermined macroblock isthe top or bottom macroblock of the predetermined macroblock pair regionsuch that if the predetermined macroblock pair region is of the fieldcoded distribution type, the macroblock pair region to the left is alsoof the field coded distribution type, and the predetermined macroblockis the bottom macroblock of the predetermined macroblock pair region,then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be a bottom macroblock of the macroblockpair region to the left of the predetermined macroblock pair region, ifthe predetermined macroblock pair region is of the field codeddistribution type, the macroblock pair region to the left is of theframe coded distribution type, and the predetermined macroblock is thebottom macroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region; meansfor assigning one of at least two context models to the predeterminedsyntax element based on a predetermined attribute of the neighboringmacroblock, wherein each context model is associated with a differentprobability estimation; and means for arithmetically decoding thepredetermined syntax element from the coded bit stream based on theprobability estimation with which the assigned context model isassociated.
 9. Method according to claim 3, wherein the step ofassigning one of at least two context models is performed such that theassignment is also based on an availability of the neighboringmacroblock indicating as to whether the predetermined macroblock and theneighboring macroblocks belong to the same slice of the video frame orto different slices of the video frame.
 10. Method according to claim 3,wherein the step of assigning one of at least two context models isperformed such that the assignment is based on a macroblock typeindicator of the neighboring macroblock, specifying a macroblockprediction mode and a partitioning of the neighboring macroblock usedfor prediction.
 11. Method according to claim 3, wherein the step ofassigning one of at least two context models is performed such that theassignment is based on the neighboring macroblock being inter or intracoded in the coded bit stream.
 12. Method according to claim 3, whereinthe step of assigning one of at least two context models is performedsuch that the assignment is based on a syntax element specifying, for aneighboring partition of the neighboring macroblock, an index of areference picture.
 13. Method according to claim 3, wherein the step ofassigning one of at least two context models is performed such that theassignment is based on an availability of the neighboring macroblockindicating as to whether the predetermined macroblock and the respectiveneighboring macroblock belong to the same slice of the video frame or todifferent slices of the video frame, a macroblock type indicator of theneighboring macroblock, specifying a macroblock prediction mode and apartitioning of the neighboring macroblock used for prediction, theneighboring macroblock being inter or intra coded in the coded bitstream, and a syntax element specifying, for a neighboring partition ofthe neighboring macroblock, an index of a reference picture.
 14. Amethod for encoding a video signal representing at least one videoframe, with the at least one video frame being composed of picturesamples, the picture samples belonging either to a first or a secondfield being captured at different time instants, the video frame beingspatially divided up into macroblock pair regions, each macroblock pairregion being associated with a top and bottom macroblock, the methodcomprising the following steps being performed by an encoder: deciding,for each macroblock pair region, as to whether the respective macroblockpair region is of a frame coded or a field coded distribution type;assigning, for each macroblock pair region, each of the pixel samples inthe respective macroblock pair region to a respective one of the top andbottom macroblock of the respective macroblock pair region, inaccordance with the distribution type of the respective macroblock pairregion; pre-coding the video signal into a pre-coded video signal,including motion prediction of the macroblocks to obtain, for eachmacroblock, a syntax element specifying, for a respective macroblock, anindex of a reference picture; determining, for the syntax element of acurrent macroblock associated with a current macroblock pair region ofthe macroblock pair regions, a neighboring macroblock to the left of thecurrent macroblock comprising a neighboring partition of thepredetermined partition, at least based upon as to whether the currentmacroblock pair region is of the frame or field coded distribution type,a macroblock pair region to the left is of the frame or field codeddistribution type, and the predetermined macroblock is the top or bottommacroblock of the predetermined macroblock pair region such that if thepredetermined macroblock pair region is of the field coded distributiontype, the macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a bottom macroblock of the macroblock pair region tothe left of the predetermined macroblock pair region, if thepredetermined macroblock pair region is of the field coded distributiontype, the macroblock pair region to the left is of the frame codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region;assigning one of at least two context models to the current syntaxelement based on a pre-determined attribute of the neighboringmacroblock, wherein each context model is associated with a differentprobability estimation; and arithmetically encoding the syntax elementof the current macroblock into a coded bit stream based on theprobability estimation with which the assigned context model isassociated.
 15. A method for decoding a predetermined syntax elementamong syntax elements of a coded bit stream from the coded bit stream,the coded bit stream being an arithmetically encoded version of apre-coded video signal, the pre-coded video signal being a pre-codedversion of a video signal, the video signal representing at least onevideo frame being composed of picture samples, the picture samplesbelonging either to a top or a bottom field of alternate rows of thevideo frame, being captured at a different time instants, the videoframe being spatially divided up into macroblock pair regions, eachmacroblock pair region being associated with a top and a bottommacroblock, each macroblock pair region being either of a frame coded ora field coded distribution type, wherein, for each macroblock pairregion, each of the pixel samples in the respective macroblock pairregion is assigned to a respective one of the top and bottom macroblockof the respective macroblock pair region in accordance with thedistribution type of the respective macroblock pair region such that, inaccordance with the frame coded distribution type, pixel samples lyingin an upper part of the respective macroblock pair region are assignedto the top macroblock and pixel samples lying in a lower part of therespective macroblock pair region are assigned to the bottom macroblock,whereas, in accordance with the field coded distribution type, pixelsamples in the respective macroblock pair region belonging to the topfield are assigned to the top macroblock and pixel samples in therespective macroblock pair region belonging to the bottom field areassigned to the bottom macroblock, wherein each of the macroblocks isassociated with a respective one of the syntax elements, thepredetermined syntax element relating to a predetermined macroblock ofthe top and bottom macroblock of a predetermined macroblock pair regionof the macroblock pair regions, and specifying, for the predeterminedmacroblock, an index of a reference picture used in motion prediction ofthe predetermined macroblock, wherein the method comprises the followingsteps being performed by a decoder: determining, for the predeterminedsyntax element, a neighboring macroblock to the left of thepredetermined macroblock at least based upon as to whether thepredetermined macroblock pair region is of the frame or field codeddistribution type, a macroblock pair region to the left is of the frameor field coded distribution type, and the predetermined macroblock isthe top or bottom macroblock of the predetermined macroblock pair regionsuch that if the predetermined macroblock pair region is of the fieldcoded distribution type, the macroblock pair region to the left is alsoof the field coded distribution type, and the predetermined macroblockis the bottom macroblock of the predetermined macroblock pair region,then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be a bottom macroblock of the macroblockpair region to the left of the predetermined macroblock pair region, ifthe predetermined macroblock pair region is of the field codeddistribution type, the macroblock pair region to the left is of theframe coded distribution type, and the predetermined macroblock is thebottom macroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region;assigning one of at least two context models to the predetermined syntaxelement based on a predetermined attribute of the neighboringmacroblock, wherein each context model is associated with a differentprobability estimation; and arithmetically decoding the predeterminedsyntax element from the coded bit stream based on the probabilityestimation with which the assigned context model is associated.
 16. Anapparatus for encoding a video signal representing at least one videoframe, with the at least one video frame being composed of picturesamples, the picture samples belonging either to a first or a secondfield being captured at different time instants, the video frame beingspatially divided up into macroblock pair regions, each macroblock pairregion being associated with a top and bottom macroblock, the apparatuscomprising: means for deciding, for each macroblock pair region, as towhether the respective macroblock pair region is of a frame coded or afield coded distribution type; means for assigning, for each macroblockpair region, each of the pixel samples in the respective macroblock pairregion to a respective one of the top and bottom macroblock of therespective macroblock pair region, in accordance with the distributiontype of the respective macroblock pair region; means for pre-coding thevideo signal into a pre-coded video signal, including motion predictionof the macroblocks to obtain, for each macroblock, a syntax elementspecifying, for respective macroblock, an index of a reference picture;means for determining, for the syntax element of a current macroblockassociated with a current macroblock pair region of the macroblock pairregions, a neighboring macroblock to the left of the current macroblockbased upon as to whether the current macroblock pair region is of theframe or field coded distribution type, a macroblock pair region to theleft is of the frame or field coded distribution type, and thepredetermined macroblock is the top or bottom macroblock of thepredetermined macroblock pair region such that if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a bottom macroblock of the macroblock pair region tothe left of the predetermined macroblock pair region, if thepredetermined macroblock pair region is of the field coded distributiontype, the macroblock pair region to the left is of the frame codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region; meansfor assigning one of at least two context models to the current syntaxelement based on a pre-determined attribute of the neighboringmacroblock, wherein each context model is associated with a differentprobability estimation; and means for arithmetically encoding the syntaxelement of the current macroblock into a coded bit stream based on theprobability estimation with which the assigned context model isassociated.
 17. An apparatus for decoding a predetermined syntax elementamong syntax elements of a coded bit stream from the coded bit stream,the coded bit stream being an arithmetically encoded version of apre-coded video signal, the pre-coded video signal being a pre-codedversion of a video signal, the video signal representing at least onevideo frame being composed of picture samples, the picture samplesbelonging either to a top or a bottom field of alternate rows of thevideo frame, being captured at a different time instants, the videoframe being spatially divided up into macroblock pair regions, eachmacroblock pair region being associated with a top and a bottommacroblock, each macroblock pair region being either of a frame coded ora field coded distribution type, wherein, for each macroblock pairregion, each of the pixel samples in the respective macroblock pairregion is assigned to a respective one of the top and bottom macroblockof the respective macroblock pair region in accordance with thedistribution type of the respective macroblock pair region such that, inaccordance with the frame coded distribution type, pixel samples lyingin an upper part of the respective macroblock pair region are assignedto the top macroblock and pixel samples lying in a lower part of therespective macroblock pair region are assigned to the bottom macroblock,whereas, in accordance with the field coded distribution type, pixelsamples in the respective macroblock pair region belonging to the topfield are assigned to the top macroblock and pixel samples in therespective macroblock pair region belonging to the bottom field areassigned to the bottom macroblock, wherein each of the macroblocks isassociated with a respective one of the syntax elements, thepredetermined syntax element relating to a predetermined macroblock ofthe top and bottom macroblock of a predetermined macroblock pair regionof the macroblock pair regions, and specifying, for the predeterminedmacroblock, an index of a reference picture used in motion prediction ofthe predetermined macroblock, wherein the apparatus comprises: means fordetermining, for the predetermined syntax element, a neighboringmacroblock to the left of the predetermined macroblock at least basedupon as to whether the predetermined macroblock pair region is of theframe or field coded distribution type, a macroblock pair region to theleft is of the frame or field coded distribution type, and thepredetermined macroblock is the top or bottom macroblock of thepredetermined macroblock pair region such that if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a bottom macroblock of the macroblock pair region tothe left of the predetermined macroblock pair region, if thepredetermined macroblock pair region is of the field coded distributiontype, the macroblock pair region to the left is of the frame codeddistribution type, and the predetermined macroblock is the bottommacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region; meansfor assigning one of at least two context models to the predeterminedsyntax element based on a predetermined attribute of the neighboringmacroblock, wherein each context model is associated with a differentprobability estimation; and means for arithmetically decoding thepredetermined syntax element from the coded bit stream based on theprobability estimation with which the assigned context model isassociated.
 18. A decoder for decoding a predetermined syntax elementamong syntax elements of a coded bit stream from the coded bit stream,the coded bit stream being an arithmetically encoded version of apre-coded video signal, the pre-coded video signal being a pre-codedversion of a video signal, the video signal representing at least onevideo frame being composed of picture samples, the picture samplesbelonging either to a top or a bottom field of alternate rows of thevideo frame, being captured at a different time instants, the videoframe being spatially divided up into macroblock pair regions, eachmacroblock pair region being associated with a top and a bottommacroblock, each macroblock pair region being either of a frame coded ora field coded distribution type, wherein, for each macroblock pairregion, each of the pixel samples in the respective macroblock pair.region is assigned to a respective one of the top and bottom macroblockof the respective macroblock pair region in accordance with thedistribution type of the respective macroblock pair region such that, inaccordance with the frame coded distribution type, pixel samples lyingin an upper part of the respective macroblock pair region are assignedto the top macroblock and pixel samples lying in a lower part of therespective macroblock pair region are assigned to the bottom macroblock,whereas, in accordance with the field coded distribution type, pixelsamples in the respective macroblock pair region belonging to the topfield are assigned to the top macroblock and pixel samples in therespective macroblock pair region belonging to the bottom field areassigned to the bottom macroblock, wherein each of the macroblocks isassociated with a respective one of the syntax elements, thepredetermined syntax element relating to a predetermined macroblock ofthe top and bottom macroblocks of a predetermined macroblock pair regionof the macroblock pair regions and specifies, for a predetermined one ofpartitions of the predetermined macroblock, an index of a referencepicture used in motion prediction of the predetermined macroblock,wherein the decoder comprises a processor configured to determine, forthe predetermined syntax element, a neighboring macroblock to the leftof the predetermined macroblock, at least based upon as to whether thepredetermined macroblock pair region is of the frame or field codeddistribution type, a macroblock pair region to the left is of the frameor field coded distribution type, and the predetermined macroblock isthe top or bottom macroblock of the predetermined macroblock pair regionsuch that if the predetermined macroblock pair region is of the fieldcoded distribution type, the macroblock pair region to the left is alsoof the field coded distribution type, and the predetermined macroblockis the bottom macroblock of the predetermined macroblock pair region,then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be a bottom macroblock of the macroblockpair region to the left of the predetermined macroblock pair region, ifthe predetermined macroblock pair region is of the field codeddistribution type, the macroblock pair region to the left is of theframe coded distribution type, and the predetermined macroblock is thebottom macroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be a top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if a line number of aluma location of an upper-left sample of the predetermined subpart, lieswithin a top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin a bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the field coded distributiontype, a macroblock pair region to the left is also of the field codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the field coded distribution type, themacroblock pair region to the left is of the frame coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the top half of the predetermined macroblock, and the neighboringmacroblock to the left of the predetermined macroblock is determined tobe the bottom macroblock of the macroblock pair region to the left ofthe predetermined macroblock pair region, if the line number of the lumalocation of the upper-left sample of the predetermined subpart, lieswithin the bottom half of the predetermined macroblock, if thepredetermined macroblock pair region is of the frame coded distributiontype, a macroblock pair region to the left is also of the frame codeddistribution type, and the predetermined macroblock is the topmacroblock of the predetermined macroblock pair region, then theneighboring macroblock to the left of the predetermined macroblock isdetermined to be the top macroblock of the macroblock pair region to theleft of the predetermined macroblock pair region, if the predeterminedmacroblock pair region is of the frame coded distribution type, themacroblock pair region to the left is of the field coded distributiontype, and the predetermined macroblock is the top macroblock of thepredetermined macroblock pair region, then the neighboring macroblock tothe left of the predetermined macroblock is determined to be the topmacroblock of the macroblock pair region to the left of thepredetermined macroblock pair region, if the predetermined macroblockpair region is of the frame coded distribution type, a macroblock pairregion to the left is also of the frame coded distribution type, and thepredetermined macroblock is the bottom macroblock of the predeterminedmacroblock pair region, then the neighboring macroblock to the left ofthe predetermined macroblock is determined to be the bottom macroblockof the macroblock pair region to the left of the predeterminedmacroblock pair region, if the predetermined macroblock pair region isof the frame coded distribution type, the macroblock pair region to theleft is of the field coded distribution type, and the predeterminedmacroblock is the bottom macroblock of the predetermined macroblock pairregion, then the neighboring macroblock to the left of the predeterminedmacroblock is determined to be the top macroblock of the macroblock pairregion to the left of the predetermined macroblock pair region; assignone of at least two context models to the predetermined syntax elementof the predetermined macroblock based on a predetermined attribute ofthe neighboring macroblock to the left of the predetermined macroblockand the neighboring macroblock to the top of the predeterminedmacroblock, wherein each context model is associated with a differentprobability estimation; and arithmetically decode the predeterminedsyntax element from the coded bit stream based on the probabilityestimation with which the assigned context model is associated.